fix: Set default Redis socket timeout to None (#27104)

This commit is contained in:
EntropyYue authored and GitHub committed 2026-07-27 00:30:00 -04:00
1 parent 57e60423b9
commit f21d7947f9
2 files changed
+9

No files matched your search

+6
View File
@@ -389,6 +389,12 @@ try:
except ValueError:
REDIS_SOCKET_CONNECT_TIMEOUT = None
REDIS_SOCKET_TIMEOUT = os.getenv('REDIS_SOCKET_TIMEOUT', '')
try:
REDIS_SOCKET_TIMEOUT = float(REDIS_SOCKET_TIMEOUT)
except ValueError:
REDIS_SOCKET_TIMEOUT = None
# Whether to enable TCP SO_KEEPALIVE on Redis client sockets. Opt-in:
# defaults to off so behavior is unchanged for existing deployments. When
# enabled, the kernel sends TCP keepalive probes on idle connections so