Video end service sometimes not sent when using a secondary transport #1551
Labels
bug
A defect in the library
manager-streaming-video
Relating to the manager layer - video streaming
transport-secondary
Relating to the secondary transport
Bug Report
Due to TCP socket's resources getting reclaimed by the kernel when the app on the device is backgrounded, the TCP socket must be closed whenever the app on the device is backgrounded or the device is locked. But before the socket is closed an end video service control frame must be sent to close the current video stream.
This is done in the code currently in two separate classes, the
SDLStreamingVideoLifecycleManager
and theSDLSecondaryTransportManager
, which are both registered for theUIApplicationWillResignActiveNotification
. This creates a race condition where the transport might be destroyed by theSDLSecondaryTransportManager
before the video end service control frame is sent by theSDLStreamingVideoLifecycleManager
.Reproduction Steps
Expected Behavior
The end video service request should be sent and the TCP socket closed successfully.
Observed Behavior
The end video service request sometimes does not get sent and sometimes the TCP socket does not close successfully due to the thread not closing successfully when
SDLTCPTransport
disconnect
is called.OS & Version Information
The text was updated successfully, but these errors were encountered: