I have a socket.io client connected to node.js. If I kill node.js on the command line, the client immediately freezes (i.e., the connection stops), but there is a delay of 20 seconds before the disconnect event. Is this design behavior? Is there a configuration option to reduce the delay when triggering a trip event?
It looks like this behavior has changed in the relatively recent (last 6 months) socket.io update. Before reconnect functionality was built into socket.io, I implemented my own reconnection logic using the disconnect event handler, and the disconnect event was triggered almost instantly when the connection to the server stopped.
source
share