You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
This commit is contained in:
@@ -217,10 +217,11 @@ export default class RedisSocket extends EventEmitter {
|
||||
}
|
||||
|
||||
private _onSocketError(err: Error): void {
|
||||
const wasReady = this._isReady;
|
||||
this._isReady = false;
|
||||
this.emit('error', err);
|
||||
|
||||
if (!this._isOpen || typeof this._shouldReconnect(0, err) !== 'number') return;
|
||||
if (!wasReady || !this._isOpen || typeof this._shouldReconnect(0, err) !== 'number') return;
|
||||
|
||||
this.emit('reconnecting');
|
||||
this._connect().catch(() => {
|
||||
|
Reference in New Issue
Block a user