Fixes server crash when client is refreshing their window when leaving a room. #846

Closed
wants to merge 2 commits into
from

Projects

None yet

1 participant

When a client is refreshing their window while connected, and then leaving a room, it crashes the server since their session id is no longer in the roomClients array.

I am sharing code between leaving rooms explicitly and implicitly. Refreshing the window, the disconnect event gets fired after the user is in the roomClients array.

mohamedmansour added some commits Apr 21, 2012
@mohamedmansour @mohamedmansour mohamedmansour Fixes Socket.IO crash when client refreshes their window.
When a client is refreshing their window while connected,
and then leaving a room, it crashes the server since their
session id is no longer in the roomClients array.
d11f9ea
@mohamedmansour mohamedmansour Fix type in README it should be prompt not confirm.
For the storing data associated to a client example, it requires data to be sent, with confirm, it only brings up a yes or no dialog. But it requires data, so prompt is the correct function to call instead.
f274b23
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment