diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-03-11 09:54:43 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-03-20 23:44:58 +0800 |
| commit | 513623fc0e5182d37aaf91c6dc42670bca3aa888 (patch) | |
| tree | 0204b7297477738bccda0b3c84dbe852e2831dd7 /src | |
| parent | 351432395eb0b7960e5ec6af7de3f30d56eacc24 (diff) | |
session: log if user exited without registering
Diffstat (limited to 'src')
| -rw-r--r-- | src/session.cpp | 6 |
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); } |
