From a57762c7978e300252f80ba67c63da826f2c6f26 Mon Sep 17 00:00:00 2001 From: Tyler Brock Date: Fri, 17 Feb 2012 13:36:28 -0500 Subject: [PATCH] minor: remove unused variables in Connection and ReplSetConnection Classes --- lib/mongo/connection.rb | 9 +-------- lib/mongo/repl_set_connection.rb | 6 ------ 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/lib/mongo/connection.rb b/lib/mongo/connection.rb index 8856b66..ae77a61 100644 --- a/lib/mongo/connection.rb +++ b/lib/mongo/connection.rb @@ -542,16 +542,9 @@ module Mongo # Timeout on socket connect. @connect_timeout = opts[:connect_timeout] || nil - # Mutex for synchronizing pool access - # TODO: remove this. - @connection_mutex = Mutex.new - # Global safe option. This is false by default. @safe = opts[:safe] || false - - # Condition variable for signal and wait - @queue = ConditionVariable.new - + # Connection pool for primay node @primary = nil @primary_pool = nil diff --git a/lib/mongo/repl_set_connection.rb b/lib/mongo/repl_set_connection.rb index 6ceeac3..f4d2b34 100644 --- a/lib/mongo/repl_set_connection.rb +++ b/lib/mongo/repl_set_connection.rb @@ -451,12 +451,6 @@ module Mongo def setup(opts) @safe_mutex_lock = Mutex.new @safe_mutexes = Hash.new {|hash, key| hash[key] = Mutex.new} - - # Clean up connections to dead threads. - @last_cleanup = Time.now - @cleanup_lock = Mutex.new - - @last_refresh = Time.now opts[:connect_timeout] = opts[:connect_timeout] || 30