PaperMC/CraftBukkit-Patches/0126-Disable-ResourceLeakDetector.patch

22 lines
1 KiB
Diff

From 6e91742926a10865ffbfe599df58ab11b97c1ff4 Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Tue, 8 Jul 2014 09:01:50 +1000
Subject: [PATCH] Disable ResourceLeakDetector
Hopefully no plugins are somehow leaking buffers, but disabling the ResourceLeakDetector is a good thing for performance of the Netty IO subsytem (it's been disabled in BungeeCord for a while now).
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index a951bc9..8b95e59 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -128,6 +128,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
// Spigot end
public MinecraftServer(OptionSet options, Proxy proxy, File file1) {
+ io.netty.util.ResourceLeakDetector.setEnabled( false ); // Spigot - disable
this.e = proxy;
MinecraftServer.l = this;
// this.universe = file; // CraftBukkit
--
2.1.4