From 127ce3a84a99f4fcf95320de064e98d91e776e4c Mon Sep 17 00:00:00 2001 From: Will Reichert Date: Thu, 17 Nov 2016 08:35:00 -0600 Subject: [PATCH] NO-JIRA: change netty leak detection override to only disable if not specified on command line --- .../artemis/core/remoting/impl/netty/NettyAcceptor.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java index 3fda5ceb39..aaae10880a 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java @@ -87,8 +87,10 @@ import org.jboss.logging.Logger; public class NettyAcceptor extends AbstractAcceptor { static { - // Disable resource leak detection for performance reasons by default - ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.DISABLED); + // Disable default Netty leak detection if the Netty leak detection level system properties are not in use + if ( System.getProperty("io.netty.leakDetectionLevel") == null && System.getProperty("io.netty.leakDetection.level") == null) { + ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.DISABLED); + } } //just for debug