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 b60a41d commit 146f69bCopy full SHA for 146f69b
packages/client/lib/client/socket.ts
@@ -162,17 +162,15 @@ export default class RedisSocket extends EventEmitter {
162
this.#isReady = true;
163
this.emit('ready');
164
} catch (err) {
165
- const retryIn = this.#shouldReconnect(retries, err as Error);
+ const retryIn = this.#shouldReconnect(retries++, err as Error);
166
if (typeof retryIn !== 'number') {
167
throw retryIn;
168
}
169
170
this.emit('error', err);
171
await promiseTimeout(retryIn);
172
+ this.emit('reconnecting');
173
-
174
- retries++;
175
- this.emit('reconnecting');
176
} while (this.#isOpen && !this.#isReady);
177
178
0 commit comments