mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-20 18:06:40 +00:00
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:
parent
2ca50ecd36
commit
5cb69e00d0
@ -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));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user