Simple scenario:
- Client connects to server with socket.io (
socket = io.connect(...)) - Server crashes
- Client tries to reconnect
- User tells client to disconnect (
socket.disconnect()) - Server starts
- Client reconnects
It seems that once socket.io starts attempting to reconnect, it cannot be stopped anymore. I want step 4 to prevent step 6 from happening, but it doesn’t. What do I have to call instead?
You might want to handle the reconnection yourself.
Note: old versions used
reconnectinstead ofreconnection.