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

@ -523,7 +523,7 @@ class NetworkSession{
PacketBatch::encodeRaw($stream, $this->sendBuffer);
if($this->enableCompression){
$promise = $this->server->prepareBatch(new PacketBatch($stream->getBuffer()), $this->compressor, $syncMode, Timings::$playerNetworkSendCompressSessionBuffer);
$promise = $this->server->prepareBatch($stream->getBuffer(), $this->compressor, $syncMode, Timings::$playerNetworkSendCompressSessionBuffer);
}else{
$promise = new CompressBatchPromise();
$promise->resolve($stream->getBuffer());