Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-5362

Ensure the network streams are disconnected before CBLWebSocket is dealloc



    • Bug
    • Resolution: Fixed
    • Major
    • 3.1.6
    • 3.1.1
    • iOS
    • Security Level: Public
    • None
    • C-iOS 125
    • 2


      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.


        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.



              pasin Pasin Suriyentrakorn
              pasin Pasin Suriyentrakorn
              0 Vote for this issue
              1 Start watching this issue



                Gerrit Reviews

                  There are no open Gerrit changes