diff --git a/ruby/neo4j/driver/internal/cluster/routing_table_handler_impl.rb b/ruby/neo4j/driver/internal/cluster/routing_table_handler_impl.rb index 42ed2437..84a1e102 100644 --- a/ruby/neo4j/driver/internal/cluster/routing_table_handler_impl.rb +++ b/ruby/neo4j/driver/internal/cluster/routing_table_handler_impl.rb @@ -63,7 +63,7 @@ def fresh_cluster_composition_fetched(composition_lookup_result) addresses_to_retain = @routing_table_registry.all_servers.map(&:unicast_stream).reduce(&:+) composition_lookup_result.resolved_initial_routers&.then do |addresses| - addresses_to_retain << addresses + addresses_to_retain.merge(addresses) end @connection_pool.retain_all(addresses_to_retain)