fix: Redis 4 does not reconnect after unhandled error (#8706)

This commit is contained in:
Cory Imdieke
2023-08-29 19:52:13 -05:00
committed by GitHub
parent 42929e0e5e
commit 2b3d4e5d3c

View File

@@ -17,6 +17,10 @@ export class RedisCacheAdapter {
this.ttl = isValidTTL(ttl) ? ttl : DEFAULT_REDIS_TTL;
this.client = createClient(redisCtx);
this.queue = new KeyPromiseQueue();
this.client.on('error', err => { logger.error('RedisCacheAdapter client error', { error: err }) });
this.client.on('connect', () => {});
this.client.on('reconnecting', () => {});
this.client.on('ready', () => {});
}
async connect() {