3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-12-23 23:00:35 +01:00

Disable Netty resource leak detector by default.

Dieser Commit ist enthalten in:
Andrew Steinborn 2020-07-21 11:20:15 -04:00
Ursprung c3e2321994
Commit e32acbaae7

Datei anzeigen

@ -1,5 +1,7 @@
package com.velocitypowered.proxy;
import io.netty.util.ResourceLeakDetector;
import io.netty.util.ResourceLeakDetector.Level;
import java.text.DecimalFormat;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@ -29,6 +31,12 @@ public class Velocity {
if (System.getProperty("velocity.natives-tmpdir") != null) {
System.setProperty("io.netty.native.workdir", System.getProperty("velocity.natives-tmpdir"));
}
// Disable the resource leak detector by default as it reduces performance. Allow the user to
// override this if desired.
if (System.getProperty("io.netty.leakDetection.level") != null) {
ResourceLeakDetector.setLevel(Level.DISABLED);
}
}
/**