From 4da27036cf9aa11d51a3d09ed0efeadc9b824011 Mon Sep 17 00:00:00 2001 From: Tyler Brock Date: Mon, 27 Feb 2012 18:04:45 -0500 Subject: [PATCH] RUBY-416 removed connect_mutex from sync_refresh --- lib/mongo/repl_set_connection.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/mongo/repl_set_connection.rb b/lib/mongo/repl_set_connection.rb index 6aa6414..55ce07c 100644 --- a/lib/mongo/repl_set_connection.rb +++ b/lib/mongo/repl_set_connection.rb @@ -514,12 +514,10 @@ module Mongo end def sync_refresh - @connect_mutex.synchronize do - if @refresh_mode == :sync && - ((Time.now - @last_refresh) > @refresh_interval) - @last_refresh = Time.now - refresh - end + if @refresh_mode == :sync && + ((Time.now - @last_refresh) > @refresh_interval) + @last_refresh = Time.now + refresh end end end