Merge branch 'minor-next' into major-next

This commit is contained in:
Dylan K. Taylor
2023-03-20 23:42:40 +00:00
7 changed files with 29 additions and 43 deletions

View File

@ -378,7 +378,7 @@ class NetworkSession{
$stream = new BinaryStream($decompressed);
$count = 0;
foreach(PacketBatch::decodeRaw($stream) as $buffer){
if(++$count > 1300){
if(++$count > 100){
throw new PacketHandlingException("Too many packets in batch");
}
$packet = $this->packetPool->getPacket($buffer);
@ -1191,7 +1191,12 @@ class NetworkSession{
$attribute->markSynchronized();
}
}
$this->invManager?->flushPendingUpdates();
Timings::$playerNetworkSendInventorySync->startTiming();
try{
$this->invManager?->flushPendingUpdates();
}finally{
Timings::$playerNetworkSendInventorySync->stopTiming();
}
$this->flushSendBuffer();
}