mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
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:
@ -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));
|
||||
|
||||
|
Reference in New Issue
Block a user