From ebfab91f53e938043239f91d82fcc25bb622ca74 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Fri, 6 Jan 2012 00:37:56 -0800 Subject: [PATCH] Fixed scoping issue that causes connection to hang w/ :connect_timeout option --- lib/mongo/connection.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/mongo/connection.rb b/lib/mongo/connection.rb index 57c3947..318c917 100644 --- a/lib/mongo/connection.rb +++ b/lib/mongo/connection.rb @@ -604,6 +604,8 @@ module Mongo def check_is_master(node) begin host, port = *node + socket = nil + config = nil if @connect_timeout Mongo::TimeoutHandler.timeout(@connect_timeout, OperationTimeout) do