Replies: 1 comment
-
Hi! You can force the reconnection on the client side: socket.disconnect().connect(); This can also be triggered by the server: // server
io.on("connection", (socket) => {
socket.emit("please reconnect");
});
// client
socket.on("please reconnect", () => {
socket.disconnect().connect();
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to check status of backend socker.io server because if i deploy new backend the frontend socket is will not connect to new backend socket and i will emit event to tell frontend to connect again or so something.
Beta Was this translation helpful? Give feedback.
All reactions