fix: forward socket_timeout and socket_connect_timeout to RedisCluster

_get_redis_cluster_kwargs() filters kwargs before passing them to
redis.RedisCluster(). The allow-list was missing socket_timeout and
socket_connect_timeout, so those values were silently dropped for
cluster clients — causing connections to hang indefinitely on
unreachable nodes.

Add both kwargs to the explicit allow-list so they are forwarded to
redis-py cluster clients, matching the behavior of the non-cluster
Redis path.

Closes #27919
This commit is contained in:
sharziki 2026-05-14 20:55:49 -04:00
parent 27de6547dc
commit 68834106ff

View file

@ -100,6 +100,8 @@ def _get_redis_cluster_kwargs(client=None):
"azure_tenant_id",
"azure_client_secret",
"max_connections",
"socket_timeout",
"socket_connect_timeout",
}
return available_args