You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-09 00:22:08 +03:00
Fix execution order
If the command_queue and the offline_queue holds commands, the offline_queue should be choosen instead of the command_queue.
This commit is contained in:
@@ -91,7 +91,8 @@ function callbackOrEmit (self, callback, err, res) {
|
||||
}
|
||||
|
||||
function replyInOrder (self, callback, err, res) {
|
||||
var command_obj = self.command_queue.peekBack() || self.offline_queue.peekBack();
|
||||
// The offline queue has to be checked first, as there might be commands in both queues at the same time
|
||||
var command_obj = self.offline_queue.peekBack() || self.command_queue.peekBack();
|
||||
if (!command_obj) {
|
||||
process.nextTick(function () {
|
||||
callbackOrEmit(self, callback, err, res);
|
||||
|
Reference in New Issue
Block a user