Compressor: Use minCompressionThreshold exclusively

closes #5589
This commit is contained in:
Dylan K. Taylor
2023-03-04 15:04:43 +00:00
parent 0fcd2e7894
commit aaec21f544
5 changed files with 25 additions and 65 deletions

View File

@ -1388,7 +1388,8 @@ class Server{
$buffer = $stream->getBuffer();
if($sync === null){
$sync = !($this->networkCompressionAsync && $compressor->willCompress($buffer));
$threshold = $compressor->getCompressionThreshold();
$sync = !$this->networkCompressionAsync || $threshold === null || strlen($stream->getBuffer()) < $threshold;
}
$promise = new CompressBatchPromise();