Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
28 Views

strange message-received duplicate issue when reconnecting.

Hi, I've been having this problem for a while. This occurs on version 3.5 and 3.5.2 of the webrtc conference.

I'm using the javascript SDK.

The issue is on REconnecting to a conference. It appears that when the conference successfully reconnects, whatever the on 'message-received' function is, it is called TWICE.

So... scenario... conference.leave() happens... and you are disconnected. Once you reconnect, and receive a message, whatever function your conference.on("message-received") is set on, it will trigger TWICE.

Also, if you are disconnected, and then you clear the message-received event with: 

conference.clearEventListener("message-received");

Then once you connect, you will receive no message received events. GOOD that's normal. but then, even after you're fully connected, if you create a new event listener for it, it will duplicate it again! E.g. if you run:

conference.on('message-received', function(event) {console.log("message was received!");})

Then it starts triggering twice again!

If you get disconnected again, and you clear the listener again, reconnect, and add the listener again. it will now do it THREE times. etc.

I'd appreciate if someone on the team tried to recreate this issue. Or if it's my fault, give me some ideas on what I may be doing wrong. If it is an issue with the SDK, some advice for a temporary work around would be appreciated too.

 

edit: It seems to also happen for user-joined, but not user-left.

Tags (2)
0 Kudos
0 Replies