From 20be237dafbbd238b1513a081e3ad834e8d75f92 Mon Sep 17 00:00:00 2001 From: Salanto <62221668+Salanto@users.noreply.github.com> Date: Fri, 10 Jun 2022 09:23:59 +0200 Subject: [PATCH] Mark UserID free on regular disconnect * Fixes userID inflation bug where it would incorrectly mark freed IDs as still used. --- core/src/aoclient.cpp | 1 - core/src/server.cpp | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/aoclient.cpp b/core/src/aoclient.cpp index 5f0c0c0..8455f6d 100644 --- a/core/src/aoclient.cpp +++ b/core/src/aoclient.cpp @@ -171,7 +171,6 @@ void AOClient::clientDisconnected() if (l_updateLocks) arup(ARUPType::LOCKED, true); arup(ARUPType::CM, true); - emit clientSuccessfullyDisconnected(m_id); } diff --git a/core/src/server.cpp b/core/src/server.cpp index c736a95..28b443a 100644 --- a/core/src/server.cpp +++ b/core/src/server.cpp @@ -609,6 +609,7 @@ void Server::hookupAOClient(AOClient *client) connect(client, &AOClient::logBan, logger, &ULogger::logBan); connect(client, &AOClient::logKick, logger, &ULogger::logKick); connect(client, &AOClient::logModcall, logger, &ULogger::logModcall); + connect(client, &AOClient::clientSuccessfullyDisconnected, this, &Server::markIDFree); } void Server::increasePlayerCount()