You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is caused when the development server is restarted when the client is playing the game. The socket shows a disconnected error, and tries to reconnect. When the server is restarted, multiple Connected! messages are fired.
Fix
Emit a shutdown message to all sockets before close. The client will receive this message and then be redirected to a static problem page.
The text was updated successfully, but these errors were encountered:
Before, I wrapped all the handler bindings in socket.on('connect', ...). Every time the socket connected, it would add the same events. So when a user disconnected and reconnected without leaving the page, multiple events were bound. I moved the handler bindings out of socket.on('connect', ...) so they would only be bound once.
Issue
This issue is caused when the development server is restarted when the client is playing the game. The socket shows a disconnected error, and tries to reconnect. When the server is restarted, multiple
Connected!
messages are fired.Fix
Emit a
shutdown
message to all sockets before close. The client will receive this message and then be redirected to a static problem page.The text was updated successfully, but these errors were encountered: