RUBY-442
Using sysread so Ruby 1.8.x won't complain about nonblocking IO#read
This commit is contained in:
parent
d86c4d95f7
commit
2de3dcab94
@ -69,10 +69,8 @@ module Mongo
|
|||||||
end
|
end
|
||||||
if ready
|
if ready
|
||||||
begin
|
begin
|
||||||
@socket.read(maxlen, buffer)
|
@socket.sysread(maxlen, buffer)
|
||||||
rescue EOFError, Errno::ETIMEDOUT
|
rescue Errno::ENOTCONN, Errno::EBADF, Errno::ECONNRESET, Errno::EPIPE, Errno::ETIMEDOUT, EOFError
|
||||||
raise ConnectionError
|
|
||||||
rescue Errno::ENOTCONN, Errno::EBADF, Errno::ECONNRESET, Errno::EPIPE
|
|
||||||
raise ConnectionFailure
|
raise ConnectionFailure
|
||||||
rescue Errno::EINTR, Errno::EIO, IOError
|
rescue Errno::EINTR, Errno::EIO, IOError
|
||||||
raise OperationFailure
|
raise OperationFailure
|
||||||
|
Loading…
Reference in New Issue
Block a user