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

fix: libwebsockets retry on no-connection #513

Merged
merged 3 commits into from
Mar 7, 2024

Conversation

james-ctc
Copy link
Contributor

Describe your changes

When there is no internet connection then DNS lookups and other IP activities can take a while to return. A 60 second connect timeout was expiring and reconnect attempts were not scheduled.

Code updated to ensure that reconnection attempts are still tried.

fix: shared pointer conn_data not always checked for nullptr

Code updated to make con_data thread-safe and ensure that nullptr checks are applied.

Issue ticket number and link

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • I read the contribution documentation and made sure that my changes meet its requirements

@james-ctc james-ctc self-assigned this Mar 5, 2024
@james-ctc james-ctc requested a review from AssemblyJohn March 5, 2024 16:46
@james-ctc james-ctc force-pushed the fix/tls-reconnect-on-no-network branch 2 times, most recently from 42f15fd to d2ef365 Compare March 5, 2024 17:04
When there is no internet connetcion then DNS lookups and other IP
activities can take a while to return. A 60 second connect timeout
was expiring and reconnect attempts were not scheduled.

Code updated to ensure that reconnection attempts are still tried.

fix: shared pointer conn_data not always checked for nullptr

Code updated to make con_data thread-safe and ensure that
nullptr checks are applied.

Signed-off-by: James Chapman <[email protected]>
Signed-off-by: James Chapman <[email protected]>
Signed-off-by: James Chapman <[email protected]>
@james-ctc james-ctc force-pushed the fix/tls-reconnect-on-no-network branch from 2580d5c to 4072e81 Compare March 6, 2024 09:20
@AssemblyJohn
Copy link
Contributor

All cool, can be merged in the current libwebsocket beta.

@Pietfried Pietfried merged commit ebb83cc into main Mar 7, 2024
4 checks passed
@Pietfried Pietfried deleted the fix/tls-reconnect-on-no-network branch March 7, 2024 14:27
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