diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-05-26 14:07:35 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-06-07 17:30:26 +0800 |
| commit | 31b2280f295a9afb86fc53ee534bbf48ecca8903 (patch) | |
| tree | 0c23459ab32fa3b305eb82c86a949ec07e9b300f /src/chatManager.hpp | |
| parent | e30f6eb6872d57f7da764690589c2f0c9ffdb53b (diff) | |
v1, sigabrt on client disconnect
Diffstat (limited to 'src/chatManager.hpp')
| -rw-r--r-- | src/chatManager.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
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 <memory> +#include <mutex> #include <optional> #include <string> #include <vector> @@ -19,5 +20,8 @@ class CChatManager { std::string fmtBroadcastMessage(const SMessage &msg); std::vector<SMessage> getChat() const; + + private: + mutable std::mutex m_mutex; }; inline std::unique_ptr<CChatManager> g_pChatManager; |
