From f4a06cf025f1580e687be0ac0df97920a3a6e210 Mon Sep 17 00:00:00 2001 From: cnderrauber Date: Thu, 11 Sep 2025 16:44:52 +0800 Subject: [PATCH] Clean code as there is no oss sweeper for ingress (#3918) --- pkg/service/roommanager_service.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pkg/service/roommanager_service.go b/pkg/service/roommanager_service.go index 22ebcfadb..248327883 100644 --- a/pkg/service/roommanager_service.go +++ b/pkg/service/roommanager_service.go @@ -216,19 +216,13 @@ func (r whipParticipantService) DeleteSession(ctx context.Context, req *rpc.WHIP return nil, ErrRoomNotFound } - reason := types.ParticipantCloseReasonClientRequestLeave lp := room.GetParticipantByID(livekit.ParticipantID(req.ParticipantId)) - if lp == nil && req.FromSweeper && req.ParticipantId == "" { - lp = room.GetParticipant(livekit.ParticipantIdentity(req.ParticipantIdentity)) - reason = types.ParticipantCloseReasonStale - } - if lp != nil { lp.AddOnClose(types.ParticipantCloseKeyWHIP, nil) room.RemoveParticipant( lp.Identity(), lp.ID(), - reason, + types.ParticipantCloseReasonClientRequestLeave, ) }