lukeed / sockette

The cutest little WebSocket wrapper! 🧦
MIT License
2.45k stars 81 forks source link

ws.close should clear pending setTimeout #46

Closed spereirag closed 5 years ago

spereirag commented 5 years ago

If I call ws.close while there's a reconnection setTimeout pending, sockette still tries to reconnect after the timer finishes. I don't think this is the expected behavior, especially when you try to close the websocket after a connection failure, as it keeps trying to reconnect and failing.

maxime-guyot commented 5 years ago

+1