mirror of
https://github.com/livekit/livekit.git
synced 2026-11-23 02:29:22 +00:00
UpDataTrackManager.Close empties its map and closes each track, but does not report them unpublished. When the participant closes itself (a peer connection disconnect timeout, a full reconnect), the room removes it afterwards and finds no data tracks, so they stay in RoomTrackManager and subscribers never get the removal notification. Report each track unpublished on close, as a closing media track does. Tests cover both close paths against a real room, and Close itself: each track reported once, nothing on a second Close or for a track unpublished before it.