diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-05-20 19:00:37 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-05-20 19:00:37 +0800 |
| commit | 9e3a7d5238d1b1c7a00e457f67a8108108909f01 (patch) | |
| tree | 713628aff287107182d1bd2a0f23f0327618b3c1 /src/session.cpp | |
| parent | 092965b583bd0c377ed5d9f2af0e0f4bb0548354 (diff) | |
Revert "internal: use smart pointer for everything, no more naked pointer"
This reverts commit 72cf95bc9b1eb338457a0815eb1fe4f70b42ebb3.
segfault/IOT instruct on client exit...
Diffstat (limited to 'src/session.cpp')
| -rw-r--r-- | src/session.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/session.cpp b/src/session.cpp index 8167a91..2814c41 100644 --- a/src/session.cpp +++ b/src/session.cpp @@ -151,7 +151,7 @@ void CSession::run() { } else log(LOG, "Client {} exited without even registering", m_ip); - g_pSessionManager->kick(std::move(self)); + g_pSessionManager->kick(self); } bool CSession::isMuted() const { @@ -266,6 +266,6 @@ const std::string &CSession::getIp() const { return m_ip; } -void CSession::setSelf(std::unique_ptr<std::pair<std::jthread, std::shared_ptr<CSession>>> self) { - this->self = std::move(self); +void CSession::setSelf(std::pair<std::jthread, std::shared_ptr<CSession>> *self) { + this->self = self; } |
