summaryrefslogtreecommitdiff
path: root/src/session.cpp
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-03-11 09:30:16 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-03-20 23:44:58 +0800
commitf7c182585b32e4fbfae7cf26e91eb193216828ec (patch)
tree71993018509d92024387c65680efefcc0b18aa5e /src/session.cpp
parent53c075e2927c33355c6a108a102726f585d24119 (diff)
signal(session,sessionManager): atexit handler
sometimes have malloc: Heap corruption detected :/
Diffstat (limited to 'src/session.cpp')
-rw-r--r--src/session.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/session.cpp b/src/session.cpp
index f8506c2..a6875b0 100644
--- a/src/session.cpp
+++ b/src/session.cpp
@@ -144,3 +144,8 @@ std::string CSession::getName() {
void CSession::setSelf(std::pair<std::jthread, std::shared_ptr<CSession>> *self) {
this->self = self;
}
+
+void CSession::onShutdown() {
+ write(SYS, "Shutting down, bye");
+ g_pSessionManager->removeSession(self);
+}