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

Calling quit should always close the connection

This commit is contained in:
Ruben Bridgewater
2016-03-24 17:09:16 +01:00
parent 3704ebdd9d
commit 48481552c9
6 changed files with 114 additions and 5 deletions

View File

@@ -751,6 +751,7 @@ function handle_offline_command (self, command_obj) {
}
err = new Error(command + " can't be processed. " + msg);
err.command = command;
err.code = 'NR_OFFLINE';
utils.reply_in_order(self, callback, err);
} else {
debug('Queueing ' + command + ' for next server connection.');
@@ -845,8 +846,6 @@ RedisClient.prototype.send_command = function (command, args, callback) {
if (!this.pub_sub_mode) {
this.pub_sub_mode = this.command_queue.length + 1;
}
} else if (command === 'quit') {
this.closing = true;
}
this.command_queue.push(command_obj);