NetworkSession: remove hardcoded limit

this is already covered by the dynamic Game Packets rate limit, which is much more effective at dealing with this anyway.
This commit is contained in:
Dylan K. Taylor 2024-03-04 14:36:40 +00:00
parent 2ca50ecd36
commit 5cb69e00d0
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -383,12 +383,8 @@ class NetworkSession{
try{ try{
$stream = new BinaryStream($decompressed); $stream = new BinaryStream($decompressed);
$count = 0;
foreach(PacketBatch::decodeRaw($stream) as $buffer){ foreach(PacketBatch::decodeRaw($stream) as $buffer){
$this->gamePacketLimiter->decrement(); $this->gamePacketLimiter->decrement();
if(++$count > 100){
throw new PacketHandlingException("Too many packets in batch");
}
$packet = $this->packetPool->getPacket($buffer); $packet = $this->packetPool->getPacket($buffer);
if($packet === null){ if($packet === null){
$this->logger->debug("Unknown packet: " . base64_encode($buffer)); $this->logger->debug("Unknown packet: " . base64_encode($buffer));