Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

iOS introduces sporadic failed rounds when trying to sleep #205

Open
aledcuevas opened this issue Nov 8, 2018 · 0 comments
Open

iOS introduces sporadic failed rounds when trying to sleep #205

aledcuevas opened this issue Nov 8, 2018 · 0 comments

Comments

@aledcuevas
Copy link

Description: It seems like iOS creates socket failures and throttles app performance in a non-deterministic way. This causes semi-random failed rounds to occur from time to time, particularly when the device wants to enter sleep mode (e.g. locked). The behavior is more prevalent when "low battery mode" is enabled. It might also be more prevalent when the app is below 20% battery.

As per the documentation,

"Do minimal work while running in the background. The execution time given to background apps is more constrained than the amount of time given to the foreground app. Apps that spend too much time executing in the background can be throttled back by the system or terminated"

"Be prepared to handle connection failures in your network-based sockets. The system may tear down socket connections while your app is suspended for any number of reasons."

https://developer.apple.com/library/archive/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html

Steps to reproduce:

  1. Set up the protocol (start relay, start trustee, start "non-prifi" SOCKS server)
  2. Connect the iOS client (1.9.1) to the relay
  3. Ensure that there are not background apps that will keep the device awake (e.g. video playback) and lock the phone
  4. The protocol will continue to run but will introduce 1-2 failed rounds from time to time.

Observing the events, it seems like the device: tries to enter sleep -> fails a round -> and is woken up again every so often (see attached).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant