pladaria / reconnecting-websocket

Reconnecting WebSocket. For Web, React Native, cli (Node.js)
MIT License
1.22k stars 197 forks source link

Error on reconnect #76

Closed sfescape closed 6 years ago

sfescape commented 6 years ago

When reconnecting the send() method checks to see if _ws has a value and sends if it does. However, if you send during reconnect with _ws in CONNECTING readyState it throws an error. I think send should check for the value, and the readyState.

pladaria commented 6 years ago

Hi, thanks for reporting.

Should be fixed in latest release (v4.1.3)