From bf9bb83b6d9495da8421a5f1f8c5f20cea1300d0 Mon Sep 17 00:00:00 2001 From: Tyler Brock Date: Fri, 2 Mar 2012 19:09:51 -0500 Subject: [PATCH] minor: whitespace fixes --- lib/mongo/util/node.rb | 4 ++-- lib/mongo/util/pool.rb | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/mongo/util/node.rb b/lib/mongo/util/node.rb index ca688b5..a8d8108 100644 --- a/lib/mongo/util/node.rb +++ b/lib/mongo/util/node.rb @@ -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 diff --git a/lib/mongo/util/pool.rb b/lib/mongo/util/pool.rb index 92ccaf8..f04a705 100644 --- a/lib/mongo/util/pool.rb +++ b/lib/mongo/util/pool.rb @@ -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