RUBY-433 prevent additonal possible IOError

This commit is contained in:
Tyler Brock 2012-04-05 12:47:58 -04:00
parent 0bd7d3830d
commit ca6f4ecaa5

View File

@ -629,7 +629,9 @@ module Mongo
rescue OperationFailure, SocketError, SystemCallError, IOError
close
ensure
socket.close if socket
if socket
socket.close unless socket.closed?
end
end
config