From 1bd4d2fbee7f0c879a4e9c7cadd7d1a3c9f31c49 Mon Sep 17 00:00:00 2001 From: CakeLancelot Date: Tue, 19 Jul 2022 01:17:43 -0500 Subject: [PATCH] Cleanly remove player when an exit is requested The client will actually do this itself when clicking the quit button in the tilde menu, but for the idle timer the connection would remain open until the game is closed. --- src/PlayerManager.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/PlayerManager.cpp b/src/PlayerManager.cpp index 29c5ec4..32e2b75 100644 --- a/src/PlayerManager.cpp +++ b/src/PlayerManager.cpp @@ -369,6 +369,9 @@ static void exitGame(CNSocket* sock, CNPacketData* data) { response.iExitCode = 1; sock->sendPacket(response, P_FE2CL_REP_PC_EXIT_SUCC); + + sock->kill(); + CNShardServer::_killConnection(sock); } static void revivePlayer(CNSocket* sock, CNPacketData* data) {