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

Refactors TCPMessage to have cleaner pathways #23

Merged
merged 1 commit into from
Sep 22, 2023

Conversation

CoryFoy
Copy link
Member

@CoryFoy CoryFoy commented Sep 22, 2023

Although we have fairly robust code in the networking retry logic there were still very occasional cases where TCPMessage would get disconnected (for example in a network change) and not reconnect. This cleans up the pathways into a set of three conditions:

  1. If the TAKServer has changed (username, password, cert, server name, port) cancel the connection and do a reconnect
  2. If we're in an "actively connecting / connected" state give it a little more time
  3. If we're in a not actively connecting state (Waiting, Failed, Cancelled) force a reconnection attempt

There's a possibility that option 2 main have some edge cases we need some more work around, but in active testing across multiple network conditions we didn't have any drop/reconnect issues. Therefore this PR can be consider to close #13

@CoryFoy CoryFoy added this to the v1.0 App Store milestone Sep 22, 2023
@CoryFoy CoryFoy self-assigned this Sep 22, 2023
@CoryFoy CoryFoy merged commit f9587fe into main Sep 22, 2023
@CoryFoy CoryFoy deleted the cf/refactor-connections branch September 22, 2023 12:06
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.

App not reconnecting automatically in all cases
1 participant