websocket-sharp icon indicating copy to clipboard operation
websocket-sharp copied to clipboard

Invalid ReadyState of a client

Open NimaAra opened this issue 10 years ago • 2 comments

Why is the ReadySate of a client which has never attempted to connect, WebSocketSharp.WebSocketState.Connecting?

I would expect the state to be WebSocketSharp.WebSocketState.Closed instead.

The culprit seems to be here: https://github.com/sta/websocket-sharp/blob/master/websocket-sharp/WebSocket.cs#L1134

NimaAra avatar Jul 25 '16 16:07 NimaAra

Yes, I think this is a bug. Same unexpected behavior have faced :)

VictorKochetkov avatar Dec 31 '20 15:12 VictorKochetkov

I am also encountering this issue. For now, I am calling .close() before connecting.

ButchMonkey avatar Jan 28 '21 18:01 ButchMonkey