remove player from map in weird edgecase

This commit is contained in:
CPunch 2020-10-01 19:20:44 -05:00
parent 4fe4aeb0d3
commit 839f9a813c

View File

@ -64,8 +64,12 @@ void CNShardServer::_killConnection(CNSocket* cns) {
Player* plr = PlayerManager::getPlayer(cns);
if (plr == nullptr)
if (plr == nullptr) { // this shouldn't happen if everything works correctly...
PlayerManager::removePlayer(cns);
// also, hopefully the player's progress was already saved since the last db save interval, but rip those 2 mins of progress lol
return;
}
int64_t key = plr->SerialKey;