Remove unnecessary PacketBatch instantiations

This commit is contained in:
Dylan K. Taylor
2023-03-16 13:35:12 +00:00
parent 11ef6414b0
commit ec2b53f61a
3 changed files with 4 additions and 7 deletions

View File

@ -76,7 +76,7 @@ final class StandardPacketBroadcaster implements PacketBroadcaster{
PacketBatch::encodeRaw($stream, $packetBuffers);
$batchBuffer = $stream->getBuffer();
$promise = $this->server->prepareBatch(new PacketBatch($batchBuffer), $compressor, timings: Timings::$playerNetworkSendCompressBroadcast);
$promise = $this->server->prepareBatch($batchBuffer, $compressor, timings: Timings::$playerNetworkSendCompressBroadcast);
foreach($compressorTargets as $target){
$target->queueCompressed($promise);
}