Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-06 00:00:47 +01:00
Fix invalid compression values not stopping proxy
Dieser Commit ist enthalten in:
Ursprung
9af6829688
Commit
479592c009
@ -128,12 +128,14 @@ public class VelocityConfiguration {
|
|||||||
|
|
||||||
if (compressionLevel < -1 || compressionLevel > 9) {
|
if (compressionLevel < -1 || compressionLevel > 9) {
|
||||||
logger.error("Invalid compression level {}", compressionLevel);
|
logger.error("Invalid compression level {}", compressionLevel);
|
||||||
|
valid = false;
|
||||||
} else if (compressionLevel == 0) {
|
} else if (compressionLevel == 0) {
|
||||||
logger.warn("ALL packets going through the proxy are going to be uncompressed. This will increase bandwidth usage.");
|
logger.warn("ALL packets going through the proxy are going to be uncompressed. This will increase bandwidth usage.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (compressionThreshold < -1) {
|
if (compressionThreshold < -1) {
|
||||||
logger.error("Invalid compression threshold {}", compressionLevel);
|
logger.error("Invalid compression threshold {}", compressionLevel);
|
||||||
|
valid = false;
|
||||||
} else if (compressionThreshold == 0) {
|
} else if (compressionThreshold == 0) {
|
||||||
logger.warn("ALL packets going through the proxy are going to be compressed. This may hurt performance.");
|
logger.warn("ALL packets going through the proxy are going to be compressed. This may hurt performance.");
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren