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: Adds a quick fix for the iOS sync issue after suspend #2414

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

leblowl
Copy link
Collaborator

@leblowl leblowl commented Apr 6, 2024

iOS appears to not be syncing correctly after resuming from suspend. It looks like this is due to the libp2p auto-dialer getting stuck connecting to the Tor HTTP tunnel port which is replaced after suspend/resume. This commit enables the WebsocketOverTor transport to use the dialTimeout correctly. But still this means the current dialer waits for dialTimeout to try another peer, and we currently have dialTimeout set to 2 minutes. Ideally, we can find a better approach for closing any sockets when suspending the app or detecting when we are trying to connect to a port that nothing is listening on, if that's possible. Using the dialTimeout correctly, is still important regardless.

This is sort of a solution for #2396

Pull Request Checklist

  • I have linked this PR to a related GitHub issue.
  • I have added a description of the change (and Github issue number, if any) to the root CHANGELOG.md.

(Optional) Mobile checklist

Please ensure you completed the following checks if you did any changes to the mobile package:

  • I have run e2e tests for mobile
  • I have updated base screenshots for visual regression tests

iOS appears to not be syncing correctly after resuming from suspend.
It looks like this is due to the libp2p auto-dialler getting stuck
connecting to the Tor HTTP tunnel port which is replaced after
suspend/resume. This commit enables the WebsocketOverTor transport to
use the `dialTimeout` correctly. But still this means the current
dialer waits for `dialTimeout` to try another peer, and we currently
have `dialTimeout` set to 2 minutes. Ideally, we can find a better
approach for closing any sockets when suspending the app or detecting
when we are trying to connect to a port that nothing is listening on,
if that's possible.
@leblowl leblowl merged commit 595d896 into 2.2.0 Apr 8, 2024
11 of 15 checks passed
leblowl pushed a commit that referenced this pull request Apr 10, 2024
iOS appears to not be syncing correctly after resuming from suspend.
It looks like this is due to the libp2p auto-dialler getting stuck
connecting to the Tor HTTP tunnel port which is replaced after
suspend/resume. This commit enables the WebsocketOverTor transport to
use the `dialTimeout` correctly. But still this means the current
dialer waits for `dialTimeout` to try another peer, and we currently
have `dialTimeout` set to 2 minutes. Ideally, we can find a better
approach for closing any sockets when suspending the app or detecting
when we are trying to connect to a port that nothing is listening on,
if that's possible.
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.

1 participant