From 74900195353313f83bbf8fa9e55e67890792c0e7 Mon Sep 17 00:00:00 2001 From: Emelia Smith Date: Fri, 2 Aug 2024 08:56:09 +0200 Subject: [PATCH] Fix support for IPv6 redis connections in streaming (#31229) --- streaming/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/streaming/index.js b/streaming/index.js index dd9ea0c7f..8f6636217 100644 --- a/streaming/index.js +++ b/streaming/index.js @@ -248,6 +248,10 @@ const redisConfigFromEnv = (env) => { const redisParams = { host: env.REDIS_HOST || '127.0.0.1', port: redisPort, + // Force support for both IPv6 and IPv4, by default ioredis sets this to 4, + // only allowing IPv4 connections: + // https://github.com/redis/ioredis/issues/1576 + family: 0, db: redisDatabase, password: env.REDIS_PASSWORD || undefined, };