From 95d1129e7542a5d50f51a5e5e48e4891d4de9adc Mon Sep 17 00:00:00 2001 From: Tyler Brock Date: Fri, 17 Feb 2012 15:18:02 -0500 Subject: [PATCH] minor: cleanup unused variables + methods --- lib/mongo/connection.rb | 4 ---- lib/mongo/repl_set_connection.rb | 6 +----- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/lib/mongo/connection.rb b/lib/mongo/connection.rb index ae77a61..e500ce4 100644 --- a/lib/mongo/connection.rb +++ b/lib/mongo/connection.rb @@ -407,10 +407,6 @@ module Mongo end alias :reconnect :connect - def connecting? - @nodes_to_try.length > 0 - end - # It's possible that we defined connected as all nodes being connected??? # NOTE: Do check if this needs to be more stringent. # Probably not since if any node raises a connection failure, all nodes will be closed. diff --git a/lib/mongo/repl_set_connection.rb b/lib/mongo/repl_set_connection.rb index f4d2b34..1443cab 100644 --- a/lib/mongo/repl_set_connection.rb +++ b/lib/mongo/repl_set_connection.rb @@ -20,7 +20,6 @@ module Mongo # Instantiates and manages connections to a MongoDB replica set. class ReplSetConnection < Connection - CLEANUP_INTERVAL = 300 attr_reader :replica_set_name, :seeds, :refresh_interval, :refresh_mode, :refresh_version @@ -107,13 +106,11 @@ module Mongo # TODO: add a method for replacing this list of node. @seeds.freeze - # TODO: get rid of this - @nodes = @seeds.dup - # Refresh @refresh_mode = opts.fetch(:refresh_mode, false) @refresh_interval = opts[:refresh_interval] || 90 @last_refresh = Time.now + @refresh_version = 0 # No connection manager by default. @manager = nil @@ -139,7 +136,6 @@ module Mongo end @connected = false - @refresh_version = 0 # Replica set name if opts[:rs_name]