kaizencc/code-words-game

Refresh page disconnects user

Closed this issue · 1 comments

Currently, refreshing the page disconnects the user, which means that if there is only one user in the room, the room gets deleted on refresh. Ideally I figure out how to check if a refresh is happening and then skip the room deletion.

There is no way (that I know of) to stop the socket.disconnect code from happening, but I have implemented a way to check if it is a refresh and the room will not get deleted.