Skip to content

Commit 24f3e3f

Browse files
committed
clean code
1 parent 7e2059b commit 24f3e3f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/client/lib/client/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,10 +268,10 @@ export default class RedisClient<M extends RedisModules, S extends RedisScripts>
268268
.on('data', data => this.#queue.parseResponse(data))
269269
.on('error', err => {
270270
this.emit('error', err);
271-
if (!this.#socket.isOpen) {
272-
this.#queue.flushAll(err);
273-
} else {
271+
if (this.#socket.isOpen) {
274272
this.#queue.flushWaitingForReply(err);
273+
} else {
274+
this.#queue.flushAll(err);
275275
}
276276
})
277277
.on('connect', () => this.emit('connect'))

0 commit comments

Comments
 (0)