Changes between Version 3 and Version 4 of Ticket #1482
- Timestamp:
- Jun 26, 2012 6:04:21 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #1482 – Description
v3 v4 19 19 1. '''Use a background task to ensure that the app doesn't suspend immediately after being waken up.''' App most likely will need to send something when it is waken up, for example some requests or TCP keep-alive data. Chances are these data will be responded by the server. If the app immediately gets suspended after sending them, it will be waken up again when the response arrives, hence adding to the wake up count. The app should delay as much as iOS allows before it goes to suspended state again, to take care the fact that some requests do take a while to complete, for example due to authentication. 20 20 21 2. '''Fixing spurious wakeups problem'''. It has been reported that iOS may wake up the application every 10 seconds even when there is no activity in the network. This has been correlated to TCP transport disconnection, i.e. once the TCP transport is disconnected the app starts to get waken up every 10 seconds even when Wireshark shows no activity at all. This issue seemed to have been fixed by #1465 and #148 , which now immediately close (or to close sooner) the TCP socket when it gets disconnected. If the app also holds a reference to the TCP transport, it should also release this reference once it gets the TCP disconnection notification (on the {{{on_transport_state()}}} callback), because the transport will only be destroyed once it's reference goes to zero.21 2. '''Fixing spurious wakeups problem'''. It has been reported that iOS may wake up the application every 10 seconds even when there is no activity in the network. This has been correlated to TCP transport disconnection, i.e. once the TCP transport is disconnected the app starts to get waken up every 10 seconds even when Wireshark shows no activity at all. This issue seemed to have been fixed by #1465 and #1481, which now immediately close (or to close sooner) the TCP socket when it gets disconnected. If the app also holds a reference to the TCP transport, it should also release this reference once it gets the TCP disconnection notification (on the {{{on_transport_state()}}} callback), because the transport will only be destroyed once it's reference goes to zero. 22 22