From 4a6504ec2c64e0a4beb0db6e9bf751de83e5bc1a Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Wed, 23 Nov 2022 09:33:39 +0100 Subject: [PATCH] fix "disconnect was called twice" error this would cause players to stick around after being kicked --- src/Client.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Client.cpp b/src/Client.cpp index be36117..7f7f008 100644 --- a/src/Client.cpp +++ b/src/Client.cpp @@ -63,8 +63,7 @@ void TClient::Disconnect(std::string_view Reason) { std::unique_lock Lock(mDisconnectMtx); beammp_debugf("Disconnecting client {} for reason: {}", GetID(), Reason); if (mSocket.is_open()) { - beammp_debug("Somehow Disconnect() was called twice, ignoring"); - return; + beammp_debugf("Socket for client {} already closed", GetID()); } boost::system::error_code ec; mSocket.shutdown(socket_base::shutdown_both, ec);