Skip to content

Commit

Permalink
fix: Redis 4 does not reconnect after unhandled error (#8706)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vortec4800 committed Aug 30, 2023
1 parent 42929e0 commit 2b3d4e5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Adapters/Cache/RedisCacheAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 2b3d4e5

Please sign in to comment.