1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-04 15:02:09 +03:00

chore: refactor flush and error

This commit is contained in:
Ruben Bridgewater
2017-05-28 00:13:17 +02:00
parent 2aa3b68fc6
commit 8da9e98fe6
7 changed files with 95 additions and 94 deletions

View File

@@ -29,10 +29,7 @@ function createParser (client) {
// Note: the execution order is important. First flush and emit, then create the stream
err.message += '. Please report this.'
client.ready = false
client.flushAndError({
message: 'Fatal error encountered. Command aborted.',
code: 'NR_FATAL'
}, {
client.flushAndError('Fatal error encountered. Command aborted.', 'NR_FATAL', {
error: err,
queues: ['commandQueue']
})