fix(cache): check if client is opening when attempting to close redis client (#5660)

This commit is contained in:
YANG QIA 2024-11-15 22:28:02 +08:00 committed by GitHub
parent 4daf73b76c
commit ab4e470e70
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -60,6 +60,9 @@ export class CacheManager {
redis: {
store: redisStore,
close: async (redis: RedisStore) => {
if (!redis.client?.isOpen) {
return;
}
await redis.client.quit();
},
},