RUBY-429 rescue granularity

This commit is contained in:
Tyler Brock 2012-04-04 20:12:36 -04:00
parent b2a1841f9c
commit 58f0ee8fff
1 changed files with 4 additions and 3 deletions

View File

@ -65,9 +65,10 @@ module Mongo
@socket.readpartial(maxlen, buffer) @socket.readpartial(maxlen, buffer)
rescue EOFError rescue EOFError
return ConnectionError return ConnectionError
rescue Errno::ECONNRESET, Errno::EPIPE, Errno::EINVAL, Errno::EBADF, Errno::EINTR, rescue Errno::ECONNRESET, Errno::ENOTCONN, Errno::EBADF
Errno::EIO, Errno::ENOTCONN, SocketError
raise ConnectionFailure raise ConnectionFailure
rescue Errno::EINTR, Errno::EIO, Errno::EPIPE
raise OperationFailure
end end
else else
raise OperationTimeout raise OperationTimeout