You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
clean code
This commit is contained in:
@@ -268,10 +268,10 @@ export default class RedisClient<M extends RedisModules, S extends RedisScripts>
|
|||||||
.on('data', data => this.#queue.parseResponse(data))
|
.on('data', data => this.#queue.parseResponse(data))
|
||||||
.on('error', err => {
|
.on('error', err => {
|
||||||
this.emit('error', err);
|
this.emit('error', err);
|
||||||
if (!this.#socket.isOpen) {
|
if (this.#socket.isOpen) {
|
||||||
this.#queue.flushAll(err);
|
|
||||||
} else {
|
|
||||||
this.#queue.flushWaitingForReply(err);
|
this.#queue.flushWaitingForReply(err);
|
||||||
|
} else {
|
||||||
|
this.#queue.flushAll(err);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.on('connect', () => this.emit('connect'))
|
.on('connect', () => this.emit('connect'))
|
||||||
|
Reference in New Issue
Block a user