We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ca6e1f commit f8c24c0Copy full SHA for f8c24c0
packages/client/lib/client/socket.ts
@@ -217,10 +217,11 @@ export default class RedisSocket extends EventEmitter {
217
}
218
219
private _onSocketError(err: Error): void {
220
+ const wasReady = this._isReady;
221
this._isReady = false;
222
this.emit('error', err);
223
- if (!this._isOpen || typeof this._shouldReconnect(0, err) !== 'number') return;
224
+ if (!wasReady || !this._isOpen || typeof this._shouldReconnect(0, err) !== 'number') return;
225
226
this.emit('reconnecting');
227
this._connect().catch(() => {
0 commit comments