Fixed scoping issue that causes connection to hang w/ :connect_timeout option

This commit is contained in:
Andrew Kane 2012-01-06 00:37:56 -08:00
parent 63708a5f16
commit ebfab91f53

View File

@ -604,6 +604,8 @@ module Mongo
def check_is_master(node) def check_is_master(node)
begin begin
host, port = *node host, port = *node
socket = nil
config = nil
if @connect_timeout if @connect_timeout
Mongo::TimeoutHandler.timeout(@connect_timeout, OperationTimeout) do Mongo::TimeoutHandler.timeout(@connect_timeout, OperationTimeout) do