From 604f85513f9ede87b5d5b5f27cb2c37be4604139 Mon Sep 17 00:00:00 2001 From: Mike Dirolf Date: Mon, 24 Aug 2009 10:51:15 -0400 Subject: [PATCH] fix paired connection find master --- lib/mongo/db.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mongo/db.rb b/lib/mongo/db.rb index bce8263..0990819 100644 --- a/lib/mongo/db.rb +++ b/lib/mongo/db.rb @@ -154,11 +154,11 @@ module Mongo is_master = master? @semaphore.lock if semaphore_is_locked - break if @slave_ok || is_master + @slave_ok || is_master rescue SocketError, SystemCallError, IOError => ex close if @socket + false end - @socket } raise "error: failed to connect to any given host:port" unless @socket end