diff --git a/lib/mongo/connection.rb b/lib/mongo/connection.rb index cfac20e..b8d83a0 100644 --- a/lib/mongo/connection.rb +++ b/lib/mongo/connection.rb @@ -469,6 +469,7 @@ module Mongo raise ConnectionFailure, "Failed to connect to a master node at #{@host_to_try[0]}:#{@host_to_try[1]}" end end + alias :reconnect :connect def connecting? @nodes_to_try.length > 0 diff --git a/lib/mongo/repl_set_connection.rb b/lib/mongo/repl_set_connection.rb index 1c45e9b..a247153 100644 --- a/lib/mongo/repl_set_connection.rb +++ b/lib/mongo/repl_set_connection.rb @@ -125,6 +125,7 @@ module Mongo end end end + alias :reconnect :connect def connecting? @nodes_to_try.length > 0