Check participant SID also while removing a participant. (#1237)
This commit is contained in:
@@ -242,7 +242,7 @@ func (r *RoomManager) StartSession(
|
||||
} else {
|
||||
participant.GetLogger().Infow("removing duplicate participant")
|
||||
// we need to clean up the existing participant, so a new one can join
|
||||
room.RemoveParticipant(participant.Identity(), types.ParticipantCloseReasonDuplicateIdentity)
|
||||
room.RemoveParticipant(participant.Identity(), participant.ID(), types.ParticipantCloseReasonDuplicateIdentity)
|
||||
}
|
||||
} else if pi.Reconnect {
|
||||
// send leave request if participant is trying to reconnect without keep subscribe state
|
||||
@@ -541,7 +541,8 @@ func (r *RoomManager) handleRTCMessage(ctx context.Context, roomName livekit.Roo
|
||||
return
|
||||
}
|
||||
pLogger.Infow("removing participant")
|
||||
room.RemoveParticipant(identity, types.ParticipantCloseReasonServiceRequestRemoveParticipant)
|
||||
// remove participant by identity, any SID
|
||||
room.RemoveParticipant(identity, "", types.ParticipantCloseReasonServiceRequestRemoveParticipant)
|
||||
case *livekit.RTCNodeMessage_MuteTrack:
|
||||
if participant == nil {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user