summaryrefslogtreecommitdiff
path: root/src/session.cpp
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-03-11 09:54:43 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-03-20 23:44:58 +0800
commit513623fc0e5182d37aaf91c6dc42670bca3aa888 (patch)
tree0204b7297477738bccda0b3c84dbe852e2831dd7 /src/session.cpp
parent351432395eb0b7960e5ec6af7de3f30d56eacc24 (diff)
session: log if user exited without registering
Diffstat (limited to 'src/session.cpp')
-rw-r--r--src/session.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/session.cpp b/src/session.cpp
index 9838c3a..1c8dbf1 100644
--- a/src/session.cpp
+++ b/src/session.cpp
@@ -82,8 +82,10 @@ CSession::SRecvData CSession::read(const std::string &msg) {
void CSession::run() {
onConnect();
- if (registerSession())
- recvLoop();
+ registerSession() ?
+ recvLoop() :
+ // TODO: get ip and print the ip also
+ log(LOG, "User exited without even registering");
g_pSessionManager->removeSession(self);
}