diff --git a/lib/mongo/util/pool_manager.rb b/lib/mongo/util/pool_manager.rb index 413171d..65faf84 100644 --- a/lib/mongo/util/pool_manager.rb +++ b/lib/mongo/util/pool_manager.rb @@ -272,7 +272,7 @@ module Mongo def update_seed_list(members) current_members = members.map { |n| n.host_port } - @seeds = (@seeds + current_members).uniq + @seeds = (current_members + @seeds).uniq end end diff --git a/test/replica_sets/basic_test.rb b/test/replica_sets/basic_test.rb index f7dbfe1..fc64d70 100644 --- a/test/replica_sets/basic_test.rb +++ b/test/replica_sets/basic_test.rb @@ -28,6 +28,7 @@ class BasicTest < Test::Unit::TestCase [self.rs.host, self.rs.ports[2]], [self.rs.host, 19356], :name => self.rs.name) assert @conn.connected? assert @conn.seeds.include?([self.rs.host, 19356]), "Original seed nodes not cached!" + assert_equal [self.rs.host, 19356], @conn.seeds.last, "Original seed nodes not cached!" end def test_accessors