Open weilinzung opened 8 months ago
Can someone verify if this reconnectOnError is working at all?
reconnectOnError
"ioredis": "5.3.2"
const redis = new Redis({ host: host, port: port, reconnectOnError: (error: Error & { code?: string }) => { // Only reconnect when "ECONNRESET" is occurred if (error?.code === 'ECONNRESET') { console.warn( `Redis connection occurred ${error.message}, retrying...` ); return 2; } console.error( `Redis connection error, ${error?.code}, ${error.message}` ); return false; } }) redis.on('error', (error: Error & { code?: string }) => { console.error(`Redis error listener, ${error?.code}, ${error.message}`); });
I tried to log in when the error happened but I don't see any logs from above callBack.
Can someone verify if this
reconnectOnError
is working at all?"ioredis": "5.3.2"
I tried to log in when the error happened but I don't see any logs from above callBack.