the socket.io docs says we should implement our own reconnect?
Does anyone have an example of a simple reconnect scheme?
The idea is that if the user reconnects within 20 seconds he should be given the same socket.io sessionid.
In the first case, the Socket will automatically try to reconnect, after a given delay.
Socket disconnects automatically, reconnects, and disconnects again and form a loop. #918.
You can check the socket. connected property: var socket = io. connect(); console.
socket.io has reconnect support now, using the options reconnect
and reconnectionDelay
so you can let that handle everything for you if you need.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With