Intel® Collaboration Suite for WebRTC
Community support and discussions on the Intel® Collaboration Suite for WebRTC (Intel® CS for WebRTC).
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646
1136 Discussions

strange message-received duplicate issue when reconnecting.

New Contributor I

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: 


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.

0 Kudos
0 Replies