joewalnes / reconnecting-websocket

A small decorator for the JavaScript WebSocket API that automatically reconnects
MIT License
4.24k stars 970 forks source link

Reset `forcedClose` flag on socket open #101

Open tsufiev opened 5 years ago

tsufiev commented 5 years ago

Client code may close and then open reconnectingwebsocket - in that case forcedClose flag has to be reset, otherwise subsequent disconnects would be treated as forced.

tsufiev commented 5 years ago

@joewalnes hi! Could you please review this one-liner fix?