You've already forked node-redis
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:
committed by
Ruben Bridgewater
parent
b35a685c27
commit
97db227a8d
@@ -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);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user