Merge remote-tracking branch 'origin/stable' into master

# Conflicts:
#	build/php
#	composer.lock
#	phpstan.neon.dist
#	resources/vanilla
#	src/pocketmine/Server.php
#	src/pocketmine/VersionInfo.php
#	src/pocketmine/entity/Entity.php
#	src/pocketmine/lang/locale
#	src/utils/Timezone.php
#	tests/phpstan/bootstrap.php
#	tests/phpstan/configs/custom-leveldb.neon
This commit is contained in:
Dylan K. Taylor
2020-10-13 17:51:49 +01:00
11 changed files with 43 additions and 22 deletions

View File

@ -872,10 +872,10 @@ class Server{
$netCompressionThreshold = (int) $this->configGroup->getProperty("network.batch-threshold", 256);
}
$netCompressionLevel = (int) $this->configGroup->getProperty("network.compression-level", 7);
$netCompressionLevel = (int) $this->configGroup->getProperty("network.compression-level", 6);
if($netCompressionLevel < 1 or $netCompressionLevel > 9){
$this->logger->warning("Invalid network compression level $netCompressionLevel set, setting to default 7");
$netCompressionLevel = 7;
$this->logger->warning("Invalid network compression level $netCompressionLevel set, setting to default 6");
$netCompressionLevel = 6;
}
ZlibCompressor::setInstance(new ZlibCompressor($netCompressionLevel, $netCompressionThreshold, ZlibCompressor::DEFAULT_MAX_DECOMPRESSION_SIZE));