Mud Crashes when Telnet player leaves!
Closed this issue · 1 comments
LiamKenneth commented
line 14 in player-manager.js tries to remove the player from the room but the array is empty, could be being called twice. causing it to fail on the 2nd time?
LiamKenneth commented
removeByValue function now has safety checks to stop undefined errors, which fixes the original error about an empty array. And the remove player function was getting called twice. That's sorted but closing a telnet session still crashes the game.
It looks to be because players still show in the room even if the client has closed. So when a socket.send() is used. The socket is no longer available. Thus crashing the server.