This commit is contained in:
azw 2023-04-24 11:46:34 +00:00
parent 809297d9a6
commit 15f49da6c1
2 changed files with 6 additions and 3 deletions

View File

@ -16,7 +16,7 @@ void LongSession::Init(f8::MsgHdr& hdr, const ss::SS_CMKcpHandshake& msg)
void LongSession::UnInit() void LongSession::UnInit()
{ {
kcp_session_->UnInit();
} }
void LongSession::Update(long long tick) void LongSession::Update(long long tick)

View File

@ -96,10 +96,13 @@ void LongSessionMgr::DelSession(int socket_handle)
{ {
{ {
auto session = GetSession(socket_handle); auto session = GetSession(socket_handle);
if (session && session.use_count() != 2) { if (session) {
if (session.use_count() != 2) {
#ifdef DEBUG #ifdef DEBUG
abort(); abort();
#endif #endif
}
session->UnInit();
} }
} }
socket_handle_hash_.erase(socket_handle); socket_handle_hash_.erase(socket_handle);