lib/dtas/unix_client.rb in dtas-0.8.0 vs lib/dtas/unix_client.rb in dtas-0.9.0
- old
+ new
@@ -36,11 +36,11 @@
req_start(args)
res_wait(timeout)
end
def res_wait(timeout = nil)
- @to_io.wait(timeout)
+ IO.select([@to_io], nil, nil, timeout)
nr = @to_io.nread
nr > 0 or raise EOFError, "unexpected EOF from server"
- @to_io.recvmsg[0]
+ @to_io.recvmsg(nr, 0, 0)[0]
end
end