From 8fdf378a5721cba253b4019c1ecd59ddb6a6ad13 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 20 Nov 2023 15:34:16 +0000 Subject: [PATCH] Fix an issue with account portal redis connection, if no Redis port is supplied in URL we should assume the default port number 6379. --- packages/backend-core/src/redis/utils.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/backend-core/src/redis/utils.ts b/packages/backend-core/src/redis/utils.ts index 5187fe13f8..4d8b1bb9a4 100644 --- a/packages/backend-core/src/redis/utils.ts +++ b/packages/backend-core/src/redis/utils.ts @@ -75,10 +75,12 @@ export function getRedisConnectionDetails() { } const [host, port] = url.split(":") + const portNumber = parseInt(port) return { host, password, - port: parseInt(port), + // assume default port for redis if invalid found + port: isNaN(portNumber) ? 6379 : portNumber, } }