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 iOS ports issue on return from background #2424

Closed
holmesworcester opened this issue Apr 10, 2024 · 2 comments
Closed

Fix iOS ports issue on return from background #2424

holmesworcester opened this issue Apr 10, 2024 · 2 comments
Assignees
Labels

Comments

@holmesworcester
Copy link
Contributor

holmesworcester commented Apr 10, 2024

When we go to background on iOS, we close Tor and get a new port. When we resume, libp2p hangs trying to connect to the old port that nothing is listening on and we don't receive any ECONNREFUSED errors. One way to resolve this is to close any existing connections when we go to background or when we resume.

Note:
We initially fixed this by having a timeout, but the timeout requires that we a) set it very short and risk that sometimes we are timing out too early b) set it to something conservative (2 mins?) which then means that we will wait 2 mins before even trying to connect when we return from background, meaning that iOS devices will almost never successfully connect on the p2p network.

@holmesworcester holmesworcester converted this from a draft issue Apr 10, 2024
@holmesworcester
Copy link
Contributor Author

@leblowl can you fill this in?

@leblowl leblowl moved this from Next Sprint to Sprint in Quiet Apr 16, 2024
@islathehut islathehut moved this from Sprint to In progress in Quiet Apr 17, 2024
@islathehut islathehut moved this from In progress to Waiting for review in Quiet May 6, 2024
@islathehut islathehut moved this from Waiting for review to Merged in Quiet May 6, 2024
@leblowl leblowl moved this from Merged to (Mobile) Ready for QA in Quiet May 14, 2024
@kingalg
Copy link
Collaborator

kingalg commented May 21, 2024

376

Fixed (it's syncing slow, but after some time it does sync)

@kingalg kingalg closed this as completed May 21, 2024
@kingalg kingalg moved this from (Mobile) Ready for QA to Done in Quiet May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

3 participants