lib/ganapati/client.rb in ganapati-0.0.6 vs lib/ganapati/client.rb in ganapati-0.0.7
- old
+ new
@@ -5,10 +5,11 @@
socket = Thrift::Socket.new(server, port)
@transport = Thrift::BufferedTransport.new(socket)
@transport.open
protocol = Thrift::BinaryProtocol.new(@transport)
@client = ThriftHadoopFileSystem::Client.new(protocol)
- @client.setInactivityTimeoutPeriod(timeout)
+ # some versions of ruby + thrift cause an error if the following is called
+ @client.setInactivityTimeoutPeriod(timeout) unless timeout.nil?
end
def close
@transport.close
end