-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Hello guys, it's me again! After some recent debugging on the server side, we indirectly found out a slight omission that occurs during initial web socket connection process:
- After receiving 101 from server,
websocketDidConnect:(JFRWebSocket*) socketmethod gets called sendFrameWithCommand:(NSString *)command...is then called and is supposed to sendkCommandConnectmessage to server
The problem occurs within send method, more precisely:
if (![self.socket isConnected]) {
return;
}In small number of cases it happens that socket is indeed not connected and initial connection won't be made. Moreover, neither websocketDidDisconnect:(NSError *)error delegate method nor client's connectWithHeaders: method('s block) do not get called back. I had no definitive way of knowing whether connection is slow and super laggy or initial connection hasn't been made; so I added a call to websocketDidDisconnect:(NSError *)error with custom error which I further on handle by myself.
As I mentioned earlier, this happens in small number of cases but should be addressed since workarounds sometimes may omit a key library callback or function they are supposed to call. Cheers!