fix paired connection find master
This commit is contained in:
parent
ad74f0d9d8
commit
604f85513f
|
@ -154,11 +154,11 @@ module Mongo
|
||||||
is_master = master?
|
is_master = master?
|
||||||
@semaphore.lock if semaphore_is_locked
|
@semaphore.lock if semaphore_is_locked
|
||||||
|
|
||||||
break if @slave_ok || is_master
|
@slave_ok || is_master
|
||||||
rescue SocketError, SystemCallError, IOError => ex
|
rescue SocketError, SystemCallError, IOError => ex
|
||||||
close if @socket
|
close if @socket
|
||||||
|
false
|
||||||
end
|
end
|
||||||
@socket
|
|
||||||
}
|
}
|
||||||
raise "error: failed to connect to any given host:port" unless @socket
|
raise "error: failed to connect to any given host:port" unless @socket
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue