* rtc: skip a closing track when a republish reuses its client id
A MediaTrack whose receiver closed stays in the published list until the
receiver close returns, and that close waits on the subscriber down track
flush. A republish of the same client id in that window was queued behind
the dying track and its media was matched to the dying track and dropped.
The client id lookups now skip a track that is not open, and the track
close handler re-sends TrackPublished only for a queued replacement.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* rtc: answer a queued replacement only once no open track holds its cid
Two tracks can hold the same client id while the older one finishes its
close. The older track's close callback answered a request queued behind
the open track, and the media of that request landed on the open track.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* rtc: release a replacement queued behind any cid of the closing track
AddTrack queues a request behind an open track that holds its cid by
signaling or SDP cid, but the close handler released only the entry under
the track's signaling cid. A request queued by SDP cid stayed queued.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>