lib/aerospike/cluster/connection.rb in aerospike-0.1.5 vs lib/aerospike/cluster/connection.rb in aerospike-0.1.6
- old
+ new
@@ -49,11 +49,11 @@
total = 0
while total < length
begin
written = @socket.write_nonblock(buffer.read(total, length - total))
total += written
- rescue IO::WaitWriteable, Errno::EAGAIN
+ rescue IO::WaitWritable, Errno::EAGAIN
IO.select(nil, [@socket])
retry
rescue => e
Aerospike::Exceptions::Connection.new("#{e}")
end
@@ -90,11 +90,10 @@
end
def timeout=(timeout)
if timeout > 0 && timeout != @timeout
@timeout = timeout
- # if IO.select([@socket], [@socket], [@socket], timeout.to_f)
- if IO.select(nil, nil, nil, timeout.to_f)
+ if IO.select([@socket], [@socket], [@socket], timeout.to_f)
begin
# Verify there is now a good connection
@socket.connect_nonblock(@sockaddr)
rescue Errno::EISCONN
# operation successful