We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c72e20 commit 252e230Copy full SHA for 252e230
src/utils/redis.ts
@@ -33,9 +33,9 @@ if (config.redis?.enabled) {
33
34
const get = client.get.bind(client);
35
exportClient.get = (key) => new Promise((resolve, reject) => {
36
- const timeout = setTimeout(() => reject(), config.redis.getTimeout);
+ const timeout = config.redis.getTimeout ? setTimeout(() => reject(), config.redis.getTimeout) : null;
37
get(key).then((reply) => {
38
- clearTimeout(timeout);
+ if (timeout !== null) clearTimeout(timeout);
39
resolve(reply);
40
}).catch((err) => reject(err));
41
});
0 commit comments