Skip to content

BUGFIX: pubsub subscription should be unique per channelName#1

Open
marcoancona wants to merge 4 commits intolosandes:masterfrom
marcoancona:patch-1
Open

BUGFIX: pubsub subscription should be unique per channelName#1
marcoancona wants to merge 4 commits intolosandes:masterfrom
marcoancona:patch-1

Conversation

@marcoancona
Copy link
Copy Markdown

Currently MongoAdapter.prototype.add() subscribes the adaptor for every user joining the channel, which is wrong. As a consequence, when multiple users join a room, MongoAdapter.prototype.onmessage() is called for every message - and for every user - causing multiple broadcast of the same message.

Marco Ancona and others added 4 commits March 23, 2016 12:07
Currently `MongoAdapter.prototype.add()` subscribes the adaptor for every user joining the channel, which is wrong. As a consequence, when multiple users join a room,  `MongoAdapter.prototype.onmessage()` is called for every message - and for every user - causing multiple broadcast of the same message.
This fix a bug that prevented new subscriptions to a channel even when no active subscription were present
@losandes
Copy link
Copy Markdown
Owner

@marcoancona: apologies, I missed the notification of this PR, and just noticed it when answering an Issue/Question. Would you mind providing a unit test for this in socketio-mongodb.fixture.js?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants