From 1a5493be69b43fa2a3a94d913d0214f36d4ca82c Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 8 Nov 2023 23:59:36 +0000 Subject: [PATCH] change(ssr): re-connect to redis after 30s --- src/db/redis.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/db/redis.ts b/src/db/redis.ts index e5d13c8..7939a2f 100644 --- a/src/db/redis.ts +++ b/src/db/redis.ts @@ -12,9 +12,9 @@ async function connectRedis(): Promise { client.on("error", (error) => { console.error("There was an error connecting to redis: " + error); - setTimeout(() => { - redisClient = connectRedis(); - }, 5_000); // 5 seconds + setTimeout(async () => { + redisClient = await connectRedis(); + }, 30_000); // 30 seconds }); return client;