Skip to content

Commit

Permalink
fix paired connection find master
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Dirolf committed Aug 24, 2009
1 parent ad74f0d commit 604f855
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/mongo/db.rb
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,11 @@ def connect_to_master
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
Expand Down

0 comments on commit 604f855

Please sign in to comment.