From 5cb69e00d0561e37c771dafbebfeab1714757c67 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 4 Mar 2024 14:36:40 +0000 Subject: [PATCH] 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. --- src/network/mcpe/NetworkSession.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/network/mcpe/NetworkSession.php b/src/network/mcpe/NetworkSession.php index 7aa804370..0b55ae1d8 100644 --- a/src/network/mcpe/NetworkSession.php +++ b/src/network/mcpe/NetworkSession.php @@ -383,12 +383,8 @@ class NetworkSession{ try{ $stream = new BinaryStream($decompressed); - $count = 0; foreach(PacketBatch::decodeRaw($stream) as $buffer){ $this->gamePacketLimiter->decrement(); - if(++$count > 100){ - throw new PacketHandlingException("Too many packets in batch"); - } $packet = $this->packetPool->getPacket($buffer); if($packet === null){ $this->logger->debug("Unknown packet: " . base64_encode($buffer));