We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c88dea6 commit cba6dc5Copy full SHA for cba6dc5
packages/client/lib/client/socket.ts
@@ -199,7 +199,7 @@ export default class RedisSocket extends EventEmitter {
199
.off('error', reject)
200
.once('error', (err: Error) => this.#onSocketError(err))
201
.once('close', hadError => {
202
- if (!hadError && this.#isOpen && this.#socket === socket) {
+ if (!hadError && this.#isReady && this.#socket === socket) {
203
this.#onSocketError(new SocketClosedUnexpectedlyError());
204
}
205
})
0 commit comments