From 78f0b181e2496a770475cfd5631f6d649f46e71a Mon Sep 17 00:00:00 2001 From: Mike Dirolf Date: Fri, 11 Sep 2009 12:19:03 -0400 Subject: [PATCH] minor: clean up --- lib/mongo/db.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/mongo/db.rb b/lib/mongo/db.rb index f57f9ac..ae09255 100644 --- a/lib/mongo/db.rb +++ b/lib/mongo/db.rb @@ -515,10 +515,9 @@ module Mongo def send_to_db(message) connect_to_master if !connected? && @auto_reconnect begin - @socket.print(message.buf.to_s) - res = @socket.flush @logger.debug(" MONGODB #{message}") if @logger - res + @socket.print(message.buf.to_s) + @socket.flush rescue => ex close raise ex