socket.io-mongodb icon indicating copy to clipboard operation
socket.io-mongodb copied to clipboard

BUGFIX: pubsub subscription should be unique per channelName

Open marcoancona opened this issue 9 years ago • 1 comments

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.

marcoancona avatar Mar 23 '16 11:03 marcoancona

@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?

losandes avatar Jul 28 '16 12:07 losandes