You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
fix: always emit an error when the connection drops
This commit is contained in:
@@ -2,10 +2,11 @@
|
||||
|
||||
const Errors = require('redis-errors')
|
||||
|
||||
// Flush provided queues, erroring any items with a callback first
|
||||
// Flush provided queues, erroring out all items
|
||||
function flushAndError (client, message, code, options) {
|
||||
options = options || {}
|
||||
const queueNames = options.queues || ['commandQueue', 'offlineQueue'] // Flush the commandQueue first to keep the order intact
|
||||
// Flush the commandQueue first to keep the order intact
|
||||
const queueNames = options.queues || ['commandQueue', 'offlineQueue']
|
||||
for (var i = 0; i < queueNames.length; i++) {
|
||||
// If the command was fired it might have been processed so far
|
||||
const ErrorClass = queueNames[i] === 'commandQueue'
|
||||
|
Reference in New Issue
Block a user