minor: clean up

This commit is contained in:
Mike Dirolf 2009-09-11 12:19:03 -04:00
parent e6bf9d81d9
commit 78f0b181e2
1 changed files with 2 additions and 3 deletions

View File

@ -515,10 +515,9 @@ module Mongo
def send_to_db(message) def send_to_db(message)
connect_to_master if !connected? && @auto_reconnect connect_to_master if !connected? && @auto_reconnect
begin begin
@socket.print(message.buf.to_s)
res = @socket.flush
@logger.debug(" MONGODB #{message}") if @logger @logger.debug(" MONGODB #{message}") if @logger
res @socket.print(message.buf.to_s)
@socket.flush
rescue => ex rescue => ex
close close
raise ex raise ex