Files
livekit/pkg
Raja Subramanian bfae13eaa6 Keep track of pending subscription close. (#478)
Introduce a pending close map and fire onNoSubscribers only
when there are not subscribed and no pending close.

There are a couple of paths for down track close
- RemoveSubscriber
- RemoveAllSubscriber
We remove the subscriber from `subscribedTracks` in these.
This is because `AddSubscriber` checks for existing subscription.
If there is a remove followed by an add, the add should not think
there is an existing susbcription if there is a delay in down track
close callback.

But, down track close is also called directly from places like
participant close. So, have to clean up both subscribedTrack
and pendingClose when the down track close fires.

Call onNoSubscribers only when both are empty. This will allow
relay up track to stop properly when all susbcribers have left.
2022-03-01 23:30:13 +05:30
..
2022-02-27 16:54:39 -08:00
2022-02-24 23:07:15 -08:00
2022-03-01 15:48:20 +08:00
2022-02-25 11:56:26 +05:30