SocketRocket icon indicating copy to clipboard operation
SocketRocket copied to clipboard

Open Error

Open mazhar27 opened this issue 1 year ago • 3 comments

Hello, I am facing this weird issue when I connect web sockets it got connected and I start receiving messages also I got this webSocketDidOpen callback but when I send message I got this error Error Domain=SRWebSocketErrorDomain Code=2134 "Invalid State: Cannot call sendString:error: until connection is open." UserInfo={NSLocalizedDescription=Invalid State: Cannot call sendString:error: until connection is open.} getting this error while se sending data I checked everything my socket is always in connecting state and I am able to receive messages but not able to send

mazhar27 avatar Oct 30 '23 13:10 mazhar27

how to solve it?

DaverZhou avatar Nov 09 '23 13:11 DaverZhou

how to solve it?

It was weird as the instance of socket we are getting in webSocketDidOpen callback is open and I just set my instance to that one and its working fine

mazhar27 avatar Nov 14 '23 07:11 mazhar27

I also saw this in production. But it's not easy to reproduce

sjkummer avatar Dec 04 '23 15:12 sjkummer