Delay shutting down the TCP secondary transport when device app is backgrounded #1560
Labels
best practice
Not a defect but something that should be improved anyway
transport-secondary
Relating to the secondary transport
Projects
Bug Report
Due to the way iOS manages sockets, it is impossible to keep a socket alive when the app on the device is backgrounded or the device is locked with the app in the foreground. However, it is possible to create a background task when the app enters the background that will keep the socket alive for ~1 minute. This has two UX advantages:
videoStreamBackgroundString
consistently when the app on the device is backgrounded. Currently, if the device locks while video is streaming, then thevideoStreamBackgroundString
is never shown due to the socket erroring right after the device locks. We can tell the developer to configure the app to not sleep while video is streaming but if the user locks the device then there is no indication why the SDL app closed.We should try to close the socket when the background task expires, however the socket could still be reclaimed by the OS before then. This means we will need to make sure to handle all errors that might occur when the socket errors out.
Reproduction Steps
Expected Behavior
The user should see the
videoStreamBackgroundString
before the socket is closed.Observed Behavior
The video stream simply stops since the socket errors out.
OS & Version Information
The text was updated successfully, but these errors were encountered: