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

Fix for channel names with spaces. Fixes #691

Channel names with spaces were not properly resubscribed after a reconnection.
Conflicts:
	index.js
This commit is contained in:
pbihler
2014-12-08 13:02:09 +01:00
committed by Ruben Bridgewater
parent b35a685c27
commit 97db227a8d
2 changed files with 12 additions and 3 deletions

View File

@@ -308,7 +308,8 @@ RedisClient.prototype.on_ready = function () {
}
};
Object.keys(this.subscription_set).forEach(function (key) {
var parts = key.split(" ");
var space_index = key.indexOf(" ");
var parts = [key.slice(0, space_index), key.slice(space_index + 1)];
debug("Sending pub/sub on_ready " + parts[0] + ", " + parts[1]);
callback_count++;
self.send_command(parts[0] + "scribe", [parts[1]], callback);