SocketRocket
SocketRocket copied to clipboard
Open Error
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
how to solve it?
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
I also saw this in production. But it's not easy to reproduce