Changes between Version 1 and Version 3 of Ticket #1482


Ignore:
Timestamp:
May 25, 2012 4:25:31 AM (7 years ago)
Author:
bennylp
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1482

    • Property Status changed from new to closed
    • Property Backported unset
    • Property Resolution changed from to fixed
    • Property Summary changed from Info: Solution for application is getting killed by iOS 5 due to too many wakeups to Info: Solution for application getting killed by iOS 5 due to too many wakeups
  • Ticket #1482 – Description

    v1 v3  
    1919 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. 
    2020 
    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. We don't know the cause of this problem yet, but we think ticket #1465 and #1481 may help the situation. What these tickets do basically is to immediately close (or to close sooner) the TCP socket when we get 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 #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. 
    2222