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;