Open akilude opened 1 year ago
On a slightly off topic note, v4 of socket.io has been a joy to develop with. Thank you to all socket.io maintainers.
Thanks a lot for the kind words :heart:
Regarding your issue, I was not able to reproduce when switching from wifi to 4G (Chrome 117, Android):
https://github.com/socketio/socket.io/assets/13031701/c1cb342c-bddc-4e5a-9a44-22077c416062
The client reconnects right away and receives "pong" events from the server.
Does it happen on all platforms?
I will create a minimal example and share here.
Have tested on Android chrome 117, and Mac chrome 117.
One small change is that i have only one network interface open at a time. So the device has wifi on, cellular data off, then i switch off wifi and turn on cellular data
Describe the bug This happens when a user changes the network on the fly. When switching networks, the socket.io client goes from connected to disconnected to reconnected state. But the actual socket does not send or receive data for a lot longer (normally 30-45 seconds)
Additional info: The socket.io server is behind nginx.
To Reproduce
Please fill the following code example:
Socket.IO server version:
4.7.2
Socket.IO client version:4.7.2
Expected behavior The client socket must be actually connected when it emits the reconnect event.
On a slightly off topic note, v4 of socket.io has been a joy to develop with. Thank you to all socket.io maintainers.