Skip to content

Commit eb9d710

Browse files
authored
chore: ignore errors when the client closes current connections before trying to fetch the latest cluster information (#66)
1 parent d21c981 commit eb9d710

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/redis_client/cluster/router.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,12 @@ def fetch_cluster_info(config, pool: nil, **kwargs)
243243

244244
def update_cluster_info!
245245
@mutex.synchronize do
246-
@node.call_all(:close)
246+
begin
247+
@node.call_all(:close)
248+
rescue StandardError
249+
# ignore
250+
end
251+
247252
@node = fetch_cluster_info(@config, pool: @pool, **@client_kwargs)
248253
end
249254
end

0 commit comments

Comments
 (0)