mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 07:48:02 +00:00
fix(Core/PacketIO): Require valid WorldSession for CMSG_KEEP_ALIVE (#15426)
* cherry-pick commit (de4340af37)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
@@ -355,8 +355,12 @@ WorldSocket::ReadDataHandlerResult WorldSocket::ReadDataHandler()
|
|||||||
sessionGuard.lock();
|
sessionGuard.lock();
|
||||||
LogOpcodeText(opcode, sessionGuard);
|
LogOpcodeText(opcode, sessionGuard);
|
||||||
if (_worldSession)
|
if (_worldSession)
|
||||||
|
{
|
||||||
_worldSession->ResetTimeOutTime(true);
|
_worldSession->ResetTimeOutTime(true);
|
||||||
return ReadDataHandlerResult::Ok;
|
return ReadDataHandlerResult::Ok;
|
||||||
|
}
|
||||||
|
LOG_ERROR("network", "WorldSocket::ReadDataHandler: client {} sent CMSG_KEEP_ALIVE without being authenticated", GetRemoteIpAddress().to_string());
|
||||||
|
return ReadDataHandlerResult::Error;
|
||||||
case CMSG_TIME_SYNC_RESP:
|
case CMSG_TIME_SYNC_RESP:
|
||||||
packetToQueue = new WorldPacket(std::move(packet), GameTime::Now());
|
packetToQueue = new WorldPacket(std::move(packet), GameTime::Now());
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user