-
Notifications
You must be signed in to change notification settings - Fork 163
Improve disconnect vs reconnect reliability #761
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
Conversation
|
|
|
@pblazej this fixed some disconnect issues that we were seeing, do you know if it'll go into the main branch soon? |
Should be merged soon, the risk is moderate. We need to finalize the ongoing discussion about catching more edge cases (see the issue). |
hiroshihorie
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but If possible, I would rather avoid exposing the .disconnecting connection state for developer experience / simplicity. Removing/deprecating this would be hard in the future.
@hiroshihorie I'm fine with reverting the state right now, if we're able to retest it. |
stateDiagram-v2
[*] --> Disconnected
Disconnected --> Connecting: start connection
Connecting --> Connected: success
Connecting --> Disconnected: failed/canceled
Connected --> Disconnecting: user closes
Disconnecting --> Disconnected: closed
Connected --> Reconnecting: network loss / ICE restart
Reconnecting --> Connected: recovered
Reconnecting --> Disconnected: failed to reconnect
Reconnecting --> Reconnecting: retrying
|
Resolves #757
disconnect()and bring the room back to life.disconnectingstate to prevent new tasks from being started (vs cancelling ongoing tasks - a little less elegant)disconnect()is basically "destructive" - the only valid path leads to.disconnectedduringcleanup(), however that's not statically enforced in any way