-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Make OnConnectionStateChange wait for handler to finish #2702
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2702 +/- ##
==========================================
- Coverage 76.42% 76.38% -0.04%
==========================================
Files 87 87
Lines 9934 9927 -7
==========================================
- Hits 7592 7583 -9
- Misses 1870 1871 +1
- Partials 472 473 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
98dca89
to
9b21064
Compare
I have moved the updates to a operations queue. That'll run the notifications sequentially. This ensures that users can do things like |
16a9882
to
c95df47
Compare
c95df47
to
83ecdaa
Compare
This was fixed by pion/ice@67cc918, going to close here! Will be tagging a new version of pion/ice today! thank you @sukunrt :) |
It's not exactly fixed. The state reported on the callback isn't reliable. Users need to ignore the state provided on the call back and call |
OnConnectionStateChange
is used to determine whether the peer connection has succeeded and track connection state by users. It should be called in sync. Right now state changes might get reordered which would lead to tracking errors for users.