-
Notifications
You must be signed in to change notification settings - Fork 142
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
fix: improve reconnect logic. #654
Conversation
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.
Can you include a brief description of the uncovered issue and why this is the right fix?
The issue is mainly in this line https://github.com/livekit/client-sdk-flutter/pull/654/files#diff-4f309ad728e5eb8ca71a10a7283647e36936b53dc0feeb8d18edf03d3eb0d920L817. When the webrtc pc connection fails completely, fullReconnect will be triggered, but here it should clean up the signaling connection and restart to republish loca tracks. However, sending a leave request will cause the client to disconnect and be unable to restore the connection. |
@@ -116,8 +118,6 @@ class SignalClient extends Disposable with EventsEmittable<SignalEvent> { | |||
|
|||
if (_connectivityResult.contains(ConnectivityResult.none)) { | |||
logger.warning('no internet connection'); | |||
events.emit(SignalDisconnectedEvent( |
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.
There is no need to emit a SignalDisconnectedEvent
event here, because connect
or resumeConnect/restartConnect
will catch the ConnectException
and take the correct follow-up action.
No description provided.