facebookincubator / SocketRocket

A conforming Objective-C WebSocket client library.
Other
9.53k stars 2.01k forks source link

iOS 14.7.1 Socket automatically close #630

Open cxz137131304 opened 2 years ago

cxz137131304 commented 2 years ago

I encountered that after creating the socket, it was automatically closed after 5-10 seconds.

My iphone system: iOS 14.7.1; sdk version:0.6.0

first step: I create a socket and open it, it wrok well; second step: I close the previous socket,Then I create a new socket and open it. Wait for 5-10 seconds,I receive delegate (webSocket:(SRWebSocket )webSocket didCloseWithCode:(NSInteger)code reason:(NSString )reason wasClean:(BOOL)wasClean), this socket close without any reason; third step: I create a new socket again, and open it,now the new socket work well.

What the second socket wokr wrong? This BUG is inevitable.