From aa7cb6ea357ffd7eef0cc7b0a7a9c3e5b978e047 Mon Sep 17 00:00:00 2001 From: Hristo Terezov Date: Tue, 7 Nov 2023 15:14:01 -0600 Subject: [PATCH] fix(kicked): leave the conference immediately There is no reason to wait for for the event to be emitted. --- JitsiConference.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/JitsiConference.js b/JitsiConference.js index 8c5daf8831..c7ca319c17 100644 --- a/JitsiConference.js +++ b/JitsiConference.js @@ -1950,11 +1950,10 @@ JitsiConference.prototype.onMemberKicked = function( const actorParticipant = this.participants.get(actorId); if (isSelfPresence) { + this.leave().finally(() => this.xmpp.disconnect()); this.eventEmitter.emit( JitsiConferenceEvents.KICKED, actorParticipant, reason, isReplaceParticipant); - this.leave().finally(() => this.xmpp.disconnect()); - return; }