Files
livekit/pkg/rtc
armaan4658 529bd357b1 rtc: re-check data track permission after the subscriber is recorded (#5196)
subscribeDataTrack checks the publisher's permission when it resolves
the data track and records the subscriber on the track afterwards. A
publisher revoke removes only the subscribers already recorded on its
data tracks, so a subscribe that passed the check before the revoke and
was recorded after it is never removed. The subscriber keeps receiving
a data track it is no longer allowed to receive.

Resolve the track again once the subscriber is recorded, as is already
done for canSubscribe. If it is still the same data track and
permission is now denied, remove the subscriber and return
ErrNoTrackPermission. The reconcile that follows records the denial,
tells the client, and keeps the subscription waiting until permission
is granted again.
2026-11-19 18:00:39 +08:00
..
2025-08-28 05:20:25 -07:00