mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/PacketIO: Require valid WorldSession for CMSG_KEEP_ALIVE
(cherry picked from commit de4340af37)
This commit is contained in:
@@ -433,8 +433,12 @@ WorldSocket::ReadDataHandlerResult WorldSocket::ReadDataHandler()
|
||||
sessionGuard.lock();
|
||||
LogOpcodeText(opcode, sessionGuard);
|
||||
if (_worldSession)
|
||||
{
|
||||
_worldSession->ResetTimeOutTime(true);
|
||||
break;
|
||||
return ReadDataHandlerResult::Ok;
|
||||
}
|
||||
TC_LOG_ERROR("network", "WorldSocket::ReadDataHandler: client %s sent CMSG_KEEP_ALIVE without being authenticated", GetRemoteIpAddress().to_string().c_str());
|
||||
return ReadDataHandlerResult::Error;
|
||||
case CMSG_LOG_DISCONNECT:
|
||||
LogOpcodeText(opcode, sessionGuard);
|
||||
packet.rfinish(); // contains uint32 disconnectReason;
|
||||
|
||||
Reference in New Issue
Block a user