New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Network change results in incorrect connection status on the client. #4843
Comments
Thanks a lot for the kind words ❤️ Regarding your issue, I was not able to reproduce when switching from wifi to 4G (Chrome 117, Android): az_recorder_20231002_225851.mp4The 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.
The text was updated successfully, but these errors were encountered: