Hi Eskimo!
Thank you for looking into this, highly appreciated.
I have a session manager that I use for REST calls, and I made the websocket extension a part of that and am using the same session to create the webSocketTask. Was this a bad idea and should I have a separate session altogether for the websocket code?
The error that I'm getting in the completeError method is the following:
2022-01-07 11:07:23 3 - WebSocketExtension in didCompleteWithError Error Domain=NSPOSIXErrorDomain Code=57 "Socket is not connected" UserInfo={NSErrorFailingURLStringKey=https://xxxxx.com/, NSErrorFailingURLKey=https://xxxxx.com/, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalWebSocketTask <7680DF77-1C5B-46E1-A67D-AB0E0289EC6C>.<6>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalWebSocketTask <7680DF77-1C5B-46E1-A67D-AB0E0289EC6C>.<6>}
I get this for the WebSocketTask after the webSocketTask:didOpenWithProtocol: as completed
I also get the same error in the webSocketTask.receive method. Once I get this error in this method, my retry logic in the websockettask.receive() method kicks in and it just makes the problem worse.