1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +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

@@ -43,14 +43,22 @@ describe("publish/subscribe", function () {
});
describe('subscribe', function () {
it('fires a subscribe event for each channel subscribed to', function (done) {
it('fires a subscribe event for each channel subscribed to even after reconnecting', function (done) {
var a = false;
sub.on("subscribe", function (chnl, count) {
if (chnl === channel2) {
assert.equal(2, count);
return done();
if (a) {
return done();
}
sub.stream.destroy();
}
});
sub.on('reconnecting', function() {
a = true;
});
sub.subscribe(channel, channel2);
});