Core/PacketIO: Require valid WorldSession for CMSG_KEEP_ALIVE
Port From (https://github.com/TrinityCore/TrinityCore/commit/88b6d75bcedb6c8ede88715c7c3b23e3eeb682f4)
This commit is contained in:
@@ -310,8 +310,13 @@ namespace Game.Networking
|
|||||||
return ReadDataHandlerResult.WaitingForQuery;
|
return ReadDataHandlerResult.WaitingForQuery;
|
||||||
case ClientOpcodes.KeepAlive:
|
case ClientOpcodes.KeepAlive:
|
||||||
if (_worldSession != null)
|
if (_worldSession != null)
|
||||||
|
{
|
||||||
_worldSession.ResetTimeOutTime(true);
|
_worldSession.ResetTimeOutTime(true);
|
||||||
break;
|
return ReadDataHandlerResult.Ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.outError(LogFilter.Network, $"WorldSocket::ReadDataHandler: client {GetRemoteIpAddress()} sent CMSG_KEEP_ALIVE without being authenticated");
|
||||||
|
return ReadDataHandlerResult.Error;
|
||||||
case ClientOpcodes.LogDisconnect:
|
case ClientOpcodes.LogDisconnect:
|
||||||
break;
|
break;
|
||||||
case ClientOpcodes.EnableNagle:
|
case ClientOpcodes.EnableNagle:
|
||||||
|
|||||||
Reference in New Issue
Block a user