Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Resolve join promise after API channel ready" #190

Merged
merged 1 commit into from
Apr 18, 2021

Conversation

adwpc
Copy link
Contributor

@adwpc adwpc commented Apr 18, 2021

Reverts #185

@adwpc adwpc merged commit 95a4af8 into master Apr 18, 2021
@adwpc adwpc deleted the revert-185-resolve-join-after-api-channel branch April 18, 2021 13:52
adwpc added a commit that referenced this pull request Apr 20, 2021
* Revert "Resolve `join` promise after API channel ready (#185)" (#190)

This reverts commit 4d1d436.

* Resolve `join` promise after API channel ready

Previously, the (implicit) promise returned by `join` would resolve
after establishing the transports, but before the API data channel was
attached.  This meant there was a small window of time where the API
data channel was not ready, and trying to use the subscriber API during
that time would fail silently.

This change returns a promise that does not resolve until after the API
channel is established.

* Set Ion connector's `sfu` before join

It's possible for some of the callbacks to fire while awaiting
`sfu.join`, and those callbacks may need to access the connector's `sfu`
property.  So we should set it before we start the join.

Co-authored-by: adwpc <adwpc@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant