From ee63886625aef473a177ad4728eeb5784ffbe159 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Fri, 21 Mar 2025 21:19:31 +0800 Subject: fix: potential crash for weirdly exited clients fixes #9 FIXME: spamming too much will still give ``` terminate called after throwing an instance of 'std::system_error' what(): Resource deadlock avoided ``` --- src/sessionManager.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/sessionManager.hpp') diff --git a/src/sessionManager.hpp b/src/sessionManager.hpp index 4ca3311..9739918 100644 --- a/src/sessionManager.hpp +++ b/src/sessionManager.hpp @@ -16,8 +16,8 @@ class CSessionManager { void run(); void broadcast(const std::string &msg) const; - void kick(CSession *session, const bool &kill = false, const std::string &reason = ""); - void kick(std::pair> *session, const bool &kill = false, const std::string &reason = ""); + void kick(CSession *session, const bool kill = false, const std::string &reason = ""); + void kick(std::pair> *session, const bool kill = false, const std::string &reason = ""); void addSession(const CSession &session); bool nameExists(const std::string &name); -- cgit v1.2.3