joewalnes / reconnecting-websocket

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

How to destroy the reconnecting-websocket instance? #113

Open moonCai opened 4 years ago

kohenkatz commented 4 years ago

Call the .close() method. That should be all you need to do.

moonCai commented 4 years ago

I know that. After the .close() method is called, the reconnecting-websocket instance stopped receiving new messages, but it still exists in the browser.

WeChat10c792dc69c599e24c04e2bdaee9f244