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

TF-3323 Handle corner cases of web socket disconnected #3405

Conversation

dab246
Copy link
Member

@dab246 dab246 commented Jan 7, 2025

Issue

#3323

Root cause

  • In case the user loses network connection or closes the device and reopens it after a while. The websocket connection fails, the number of reconnection attempts _retryRemained = 0 but still cannot connect to the server.

Solution

  • Use AppLifecycleListener to listen for changes in the application state. We will perform a WebSocket connection check every time the application appears and the user can interact ('onResume'). If the WebSocket connection is lost, we reconnect.

Demo

Copy link

github-actions bot commented Jan 7, 2025

This PR has been deployed to https://linagora.github.io/tmail-flutter/3405.

@hoangdat hoangdat merged commit 5f646de into maintenance-v0.14.2 Jan 8, 2025
22 checks passed
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.

3 participants