From 2f002388b642c656dc82f1f095d0c8d44e81424c Mon Sep 17 00:00:00 2001 From: Raja Subramanian Date: Mon, 5 May 2025 11:50:53 +0530 Subject: [PATCH] Use participant close reason in remove. (#3639) --- pkg/rtc/room.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/rtc/room.go b/pkg/rtc/room.go index e77ac0eff..3335a7bd5 100644 --- a/pkg/rtc/room.go +++ b/pkg/rtc/room.go @@ -481,8 +481,7 @@ func (r *Room) Join(participant types.LocalParticipant, requestSource routing.Me p.GetLogger().Infow("participant active", fields...) } else if state == livekit.ParticipantInfo_DISCONNECTED { // remove participant from room - // participant should already be closed and have a close reason, so NONE is fine here - go r.RemoveParticipant(p.Identity(), p.ID(), types.ParticipantCloseReasonNone) + go r.RemoveParticipant(p.Identity(), p.ID(), p.CloseReason()) } }) participant.OnSubscriberReady(func(p types.LocalParticipant) {