Files
livekit/pkg/rtc
Raja Subramanian 2dba3b2d2e Protect duplicate subscription (another try). (#2596)
Another case of duplciate tracks in SDP.
During migration (if both publisher and subscriber migrate), subscriber
could attach the remote track of the publisher. But, while that is
happening, publisher could migrate into the node and close the remote
media track. This was causing subscriber to switch from attaching to
remote media track -> attaching to local media track.

But, as remote media track was closed while add subscription was
happening, the subscriber is removed without subscription manager being
aware of it.

So, the subscription manager's reconcile and the remove subscriber is
racing and when subscription manager re-subscribes, caching has not run
yet and that creates a duplicate.

Delay removing subscribed track till after caching is done. That means,
even if the reconciler runs, it will get an `errAlreadySubscribed` error
and it will force it to reconcile again. By the time the subscribed
track is deleted from the subscriptions map, caching is done.
2024-03-25 15:07:29 +05:30
..
2023-07-27 16:43:19 -07:00
2024-02-17 12:37:15 -08:00
2023-11-07 19:19:07 -08:00
2023-11-07 19:19:07 -08:00
2024-03-21 02:48:26 -07:00
2023-11-29 15:40:01 +05:30
2024-03-21 02:48:26 -07:00
2024-03-21 02:48:26 -07:00
2024-03-21 02:48:26 -07:00
2024-03-21 02:48:26 -07:00
2023-07-27 16:43:19 -07:00
2023-08-02 16:12:23 +08:00