Server: cast network.compression-level to int, closes #3393

This commit is contained in:
Dylan K. Taylor 2020-05-14 00:37:54 +01:00
parent ad2a39bf13
commit 2eb62c85f6

View File

@ -1396,7 +1396,7 @@ class Server{
Network::$BATCH_THRESHOLD = -1;
}
$this->networkCompressionLevel = $this->getProperty("network.compression-level", 7);
$this->networkCompressionLevel = (int) $this->getProperty("network.compression-level", 7);
if($this->networkCompressionLevel < 1 or $this->networkCompressionLevel > 9){
$this->logger->warning("Invalid network compression level $this->networkCompressionLevel set, setting to default 7");
$this->networkCompressionLevel = 7;