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:
Ursprung
c3e2321994
Commit
e32acbaae7
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren