minor: whitespace fixes

This commit is contained in:
Tyler Brock 2012-03-02 19:09:51 -05:00
parent 93b2f3da9b
commit bf9bb83b6d
2 changed files with 6 additions and 6 deletions

View File

@ -101,12 +101,12 @@ module Mongo
rescue ConnectionFailure, OperationFailure, OperationTimeout, SocketError, SystemCallError, IOError => ex
@connection.log(:warn, "Attempted connection to node #{host_string} raised " +
"#{ex.class}: #{ex.message}")
# Socket may already be nil from issuing command
if @socket && !@socket.closed?
@socket.close
end
return nil
end

View File

@ -224,10 +224,10 @@ module Mongo
end
if @pids[socket] != Process.pid
@pids[socket] = nil
@sockets.delete(socket)
socket.close if socket
checkout_new_socket
@pids[socket] = nil
@sockets.delete(socket)
socket.close if socket
checkout_new_socket
else
@checked_out << socket
@threads_to_sockets[Thread.current] = socket