-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't workingurgentIt's important that this issue is dealt with ASAPIt's important that this issue is dealt with ASAP
Description
Upon detecting another user leaving the room, clients will immediately delete the user data, which causes most game logic to break due to the missing user object.
// Remove user from room
SOCKET.on('userLeave', (userID) => {
// Clear user data
console.log(getName(userID), "disconnected");
delete USERS[userID];
updatePlayerList();
});
This crashes the client-side JS, and has the potential to crash the server too. Code-proofing will also need to be implemented to ensure this doesn't happen.
I recommend not deleting USERS[userID], but instead tagging it as a disconnected user. This would also help with issue #2.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingurgentIt's important that this issue is dealt with ASAPIt's important that this issue is dealt with ASAP