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: keep electrum connection on background #2077

Merged
merged 1 commit into from
Aug 28, 2024
Merged

Conversation

pwltr
Copy link
Collaborator

@pwltr pwltr commented Jul 22, 2024

Description

Don't intentionally disconnect from Electrum on app to background. This will keep connection up until the OS cuts network access. Reconnection is handled in beignet.

Linked Issues/Tasks

Potentially improves #2004

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (improving code without creating new functionality)

Tests

  • Detox test
  • Unit test
  • No test

QA Notes

App should reconnect to Electrum

@pwltr pwltr requested a review from limpbrains July 22, 2024 12:14
@limpbrains
Copy link
Collaborator

I thought iOS will automatically kill an app in this case, not just close the connection

@pwltr
Copy link
Collaborator Author

pwltr commented Jul 31, 2024

I thought iOS will automatically kill an app in this case, not just close the connection

Doesn't seem like that is the case. I tested a bunch on Android and on the iOS simulator and it works fine. We also had it like this before #1450, just the polling has moved to beignet.

Would be nice to get this in for this release because I think it fixes #2004

@pwltr pwltr requested review from limpbrains and removed request for limpbrains July 31, 2024 17:19
@pwltr
Copy link
Collaborator Author

pwltr commented Aug 28, 2024

Tested this again and it does seem like it helps with issue 2004

@pwltr pwltr merged commit 2a0e0af into master Aug 28, 2024
7 checks passed
@pwltr pwltr deleted the fix/electrum-background branch August 28, 2024 09:47
@catch-21
Copy link
Contributor

catch-21 commented Aug 29, 2024

Verified in 2e3cf89
I've used a real iPhone 15 (iOS 17) and iPhone 12 (iOS 14) in the farm, closed the app and left it for over 5 minutes, on restore the app was still running, iOS hadn't killed it. No errors shown either.

@limpbrains
Copy link
Collaborator

Nice!

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