livekit patch: drop stereo track ids on unpublish #360

Open
opened 2026-11-12 21:25:31 +00:00 by charles · 0 comments
Owner

Follow-up from the review of #358 (Text chat 54, #354).

PeerTransport::stereo_track_ids (third_party/livekit/src/rtc_engine/peer_transport.rs) only grows. A track's id is never removed when the track is unpublished. This is harmless, because a removed track's id matches no transceiver sender, so answer munging skips it. It is just untidy.

Why it was not fixed in #358: SessionInner::remove_track is synchronous, and the set sits behind the transport's async mutex. Pruning while an answer is applied could also race with create_sender, which records the id before it adds the transceiver. A clean fix needs an async removal path, called where the sender is removed.

Seen on commit 0167c95.

Follow-up from the review of #358 (Text chat 54, #354). `PeerTransport::stereo_track_ids` (`third_party/livekit/src/rtc_engine/peer_transport.rs`) only grows. A track's id is never removed when the track is unpublished. This is harmless, because a removed track's id matches no transceiver sender, so answer munging skips it. It is just untidy. Why it was not fixed in #358: `SessionInner::remove_track` is synchronous, and the set sits behind the transport's async mutex. Pruning while an answer is applied could also race with `create_sender`, which records the id before it adds the transceiver. A clean fix needs an async removal path, called where the sender is removed. Seen on commit 0167c95.
charles added this to the Text chat milestone 2026-11-12 21:25:31 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#360
No description provided.