From 31b2280f295a9afb86fc53ee534bbf48ecca8903 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 26 May 2025 14:07:35 +0800 Subject: v1, sigabrt on client disconnect --- src/chatManager.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/chatManager.hpp') diff --git a/src/chatManager.hpp b/src/chatManager.hpp index b48dcdb..e77027e 100644 --- a/src/chatManager.hpp +++ b/src/chatManager.hpp @@ -1,6 +1,7 @@ #pragma once #include +#include #include #include #include @@ -19,5 +20,8 @@ class CChatManager { std::string fmtBroadcastMessage(const SMessage &msg); std::vector getChat() const; + + private: + mutable std::mutex m_mutex; }; inline std::unique_ptr g_pChatManager; -- cgit v1.2.3