Clean up published track on participant removal. (#3527)

Clean up the tracks in the synchronous path and remove track from track
manager. This is not strictly required in a single node case. But,
multi-node needs this. So, doing this here for consistency.
This commit is contained in:
Raja Subramanian
2025-03-14 16:09:22 +05:30
committed by GitHub
parent 65d8aa2847
commit 20bddfea1e

View File

@@ -710,6 +710,7 @@ func (r *Room) RemoveParticipant(identity livekit.ParticipantIdentity, pID livek
// remove all published tracks
for _, t := range p.GetPublishedTracks() {
p.RemovePublishedTrack(t, false, true)
r.trackManager.RemoveTrack(t)
}