Skip to content

Commit

Permalink
netty leak detection
Browse files Browse the repository at this point in the history
  • Loading branch information
sullis committed Feb 1, 2024
1 parent 00304ca commit 1963b43
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ public class NettyParanoidLeakExtension
implements BeforeAllCallback, BeforeEachCallback, AfterEachCallback, AfterAllCallback {

private static final NettyLeakListener leakListener;
private static final String LEAK_DETECTION_LEVEL_PROP_KEY = "io.netty.leakDetection.level";

static {
System.setProperty("io.netty.leakDetection.level", "paranoid");
if (System.getProperty(LEAK_DETECTION_LEVEL_PROP_KEY) != null) {
System.setProperty(LEAK_DETECTION_LEVEL_PROP_KEY, "paranoid");
}
leakListener = new NettyLeakListener();
ByteBufUtil.setLeakListener(leakListener);
}
Expand Down

0 comments on commit 1963b43

Please sign in to comment.