diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-03-21 21:19:31 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-03-22 15:02:46 +0800 |
| commit | ee63886625aef473a177ad4728eeb5784ffbe159 (patch) | |
| tree | 39378372b9e6614dd6eb758123be77f9ed4fca06 /src/sessionManager.hpp | |
| parent | 8830ac37d72fa3465afdbd05e5d0176f0859eb97 (diff) | |
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
```
Diffstat (limited to 'src/sessionManager.hpp')
| -rw-r--r-- | src/sessionManager.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<std::jthread, std::shared_ptr<CSession>> *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<std::jthread, std::shared_ptr<CSession>> *session, const bool kill = false, const std::string &reason = ""); void addSession(const CSession &session); bool nameExists(const std::string &name); |
