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

Merge pull request #190 from bnoguchi/pub_sub_mode-fix

Pub sub mode fix
This commit is contained in:
Matt Ranney
2012-04-29 17:56:01 -07:00
2 changed files with 16 additions and 0 deletions

View File

@@ -570,6 +570,8 @@ RedisClient.prototype.return_reply = function (reply) {
if (this.debug_mode) {
console.log("All subscriptions removed, exiting pub/sub mode");
}
} else {
this.pub_sub_mode = true;
}
// subscribe commands take an optional callback and also emit an event, but only the first response is included in the callback
// TODO - document this or fix it so it works in a more obvious way