Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent race in participant update. (#308)
In load test, participant updates were racing causing subscription failures. The sequence is - Join response received - Read worker started - Add remote participants from join response - But, before that could happen, because the read worker is active, there was a participant update which contained track information. That path added the remote participant before join response handler could add it. - Eventually join response path comes around and adds the remote participant, but that version of remote participant info does not have the tracks yet. And it ends up overwriting the participant info. And it also drops tracks that are not there in the update. - As the order got reversed, tracks added by participant update path gets wiped out by join response path. - And subscription fails. Adding a simple fix to reject participant info updates that are older version. It will probably be better to process join response fully? Maybe, start the read worker only after processing join response? NOTE: When the remote participant gets created via the participant update path, the local participant itself is not set up fully.
- Loading branch information