From a95bc9df42f943fb873da0abd4ff7b09550fb343 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Thu, 13 Jan 2022 04:10:38 +0100 Subject: Remove left users from signaling list after a reconnection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The signaling object keeps a list of the known session IDS in the room which is updated when participants join or leave the room. However, the list was not updated when filtering the users that left in the meantime during a reconnection. Signed-off-by: Daniel Calviño Sánchez --- src/utils/signaling.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/utils/signaling.js') diff --git a/src/utils/signaling.js b/src/utils/signaling.js index 382c0d25f..9a6585bcf 100644 --- a/src/utils/signaling.js +++ b/src/utils/signaling.js @@ -1181,6 +1181,10 @@ Signaling.Standalone.prototype.processRoomEvent = function(data) { leftUsers = Object.keys(leftUsers) if (leftUsers.length) { this._trigger('usersLeft', [leftUsers]) + + for (i = 0; i < leftUsers.length; i++) { + delete this.joinedUsers[leftUsers[i]] + } } this._trigger('usersJoined', [joinedUsers]) this._trigger('participantListChanged') -- cgit v1.2.3