summaryrefslogtreecommitdiff
path: root/src/commandHandler.hpp
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-05-26 14:07:35 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-06-07 17:30:26 +0800
commit31b2280f295a9afb86fc53ee534bbf48ecca8903 (patch)
tree0c23459ab32fa3b305eb82c86a949ec07e9b300f /src/commandHandler.hpp
parente30f6eb6872d57f7da764690589c2f0c9ffdb53b (diff)
v1, sigabrt on client disconnect
Diffstat (limited to 'src/commandHandler.hpp')
-rw-r--r--src/commandHandler.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/commandHandler.hpp b/src/commandHandler.hpp
index bce93d2..2c8fd30 100644
--- a/src/commandHandler.hpp
+++ b/src/commandHandler.hpp
@@ -4,6 +4,7 @@
#include <any>
#include <functional>
#include <memory>
+#include <mutex>
#include <netinet/in.h>
#include <string>
#include <vector>
@@ -67,5 +68,7 @@ class CCommandHandler {
SResult exeCommand(const SCommand &command, const std::string &args) const;
std::vector<SCommand> m_vCommands;
+
+ mutable std::mutex m_mutex;
};
inline std::unique_ptr<CCommandHandler> g_pCommandHandler;