Core/PacketIO: Require valid WorldSession for CMSG_KEEP_ALIVE

Port From (https://github.com/TrinityCore/TrinityCore/commit/88b6d75bcedb6c8ede88715c7c3b23e3eeb682f4)
This commit is contained in:
hondacrx
2022-06-15 16:14:42 -04:00
parent 0224d95b91
commit 0b1ce0fa05
+6 -1
View File
@@ -310,8 +310,13 @@ namespace Game.Networking
return ReadDataHandlerResult.WaitingForQuery;
case ClientOpcodes.KeepAlive:
if (_worldSession != null)
{
_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:
break;
case ClientOpcodes.EnableNagle: