You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
fix bug not allowing you to quit while in subscribe mode - added test
This commit is contained in:
5
index.js
5
index.js
@@ -564,11 +564,10 @@ RedisClient.prototype.send_command = function () {
|
||||
}
|
||||
this.subscriptions = true;
|
||||
} else {
|
||||
if (this.subscriptions === true) {
|
||||
throw new Error("Connection in pub/sub mode, only pub/sub commands may be used");
|
||||
}
|
||||
if (command === "QUIT") {
|
||||
this.closing = true;
|
||||
} else if (this.subscriptions === true) {
|
||||
throw new Error("Connection in pub/sub mode, only pub/sub commands may be used");
|
||||
}
|
||||
this.command_queue.push(command_obj);
|
||||
}
|
||||
|
Reference in New Issue
Block a user