Details
Description
In CBLWebSocket, c4socket will call the registered dispose() function before being freed. The current implementation in CBLWebSocket assumes that the c4socket will CBLWebSocket to close the connection to disconnect from the remote server (closing network streams, socket, and DNS Service if being used) before calling the dispose() function.
However, from the CBSE ticket, it's possible the dispose() function could be called before the closing connection is actually. One of the reasons could be a delay that happened during the closing connection process. If the close process is timeout, c4socket will call the dispose() function right away.
As we couldn't have logs from the customer when the issue happened, I couldn't know for sure about the root cause of the issue. For example, there could be a case that c4socket didn't call to close the connection before calling the dispose() function at all (I couldn't see how this could happen from reviewing the code). The fix for this issue will ensure that the network streams and other opened network components will be closed before the CBLWebSocket is dealloc.
Attachments
Issue Links
- Clones
-
CBL-5362 Ensure the network streams are disconnected before CBLWebSocket is dealloc
- Closed