Skip to content

Commit

Permalink
RUBY-376 use new seed nodes first
Browse files Browse the repository at this point in the history
  • Loading branch information
banker committed Dec 2, 2011
1 parent b579a63 commit 29f3772
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mongo/util/pool_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def get_valid_seed_node

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
Expand Down
1 change: 1 addition & 0 deletions test/replica_sets/basic_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def test_cache_original_seed_nodes
[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
Expand Down

0 comments on commit 29f3772

Please sign in to comment.