We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a1861cb commit df7cc77Copy full SHA for df7cc77
index.js
@@ -401,9 +401,11 @@ function adapter(uri, opts) {
401
Redis.prototype.add = function(id, room, fn){
402
debug('adding %s to %s ', id, room);
403
var self = this;
404
+ // subscribe only once per room
405
+ var alreadyHasRoom = this.rooms.hasOwnProperty(room);
406
Adapter.prototype.add.call(this, id, room);
407
- if (!this.withChannelMultiplexing) {
408
+ if (!this.withChannelMultiplexing || alreadyHasRoom) {
409
if (fn) fn(null);
410
return;
411
}
0 commit comments