Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 00:00:41 +01:00
Move leak detector to standalone bootstrap class
Dieser Commit ist enthalten in:
Ursprung
39324ce95d
Commit
1a0ac26398
@ -30,6 +30,7 @@ import com.fasterxml.jackson.databind.JavaType;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.introspect.AnnotatedField;
|
||||
import com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition;
|
||||
import io.netty.util.ResourceLeakDetector;
|
||||
import lombok.Getter;
|
||||
import net.minecrell.terminalconsole.TerminalConsoleAppender;
|
||||
import org.apache.logging.log4j.Level;
|
||||
@ -80,6 +81,10 @@ public class GeyserStandaloneBootstrap implements GeyserBootstrap {
|
||||
private static final Map<String, String> argsConfigKeys = new HashMap<>();
|
||||
|
||||
public static void main(String[] args) {
|
||||
if (System.getProperty("io.netty.leakDetection.level") == null) {
|
||||
ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.DISABLED); // Can eat performance
|
||||
}
|
||||
|
||||
GeyserStandaloneBootstrap bootstrap = new GeyserStandaloneBootstrap();
|
||||
// Set defaults
|
||||
boolean useGuiOpts = bootstrap.useGui;
|
||||
|
@ -34,7 +34,6 @@ import com.nukkitx.network.util.EventLoops;
|
||||
import com.nukkitx.protocol.bedrock.BedrockServer;
|
||||
import io.netty.channel.epoll.Epoll;
|
||||
import io.netty.channel.kqueue.KQueue;
|
||||
import io.netty.util.ResourceLeakDetector;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.geysermc.common.PlatformType;
|
||||
@ -126,10 +125,6 @@ public class GeyserConnector {
|
||||
private Metrics metrics;
|
||||
|
||||
private GeyserConnector(PlatformType platformType, GeyserBootstrap bootstrap) {
|
||||
if (platformType == PlatformType.STANDALONE && System.getProperty("io.netty.leakDetection.level") == null) {
|
||||
ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.DISABLED); // Can eat performance
|
||||
}
|
||||
|
||||
long startupTime = System.currentTimeMillis();
|
||||
|
||||
instance = this;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren