RUBY-433 prevent additonal possible IOError
This commit is contained in:
parent
0bd7d3830d
commit
ca6f4ecaa5
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue