Skip to content

Commit

Permalink
Re-enable ResourceLeakDetectorDisableConditionalMixin
Browse files Browse the repository at this point in the history
  • Loading branch information
astei committed Apr 19, 2023
1 parent 5896b60 commit 4ce2286
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

@Mixin(SharedConstants.class)
public class ResourceLeakDetectorDisableConditionalMixin {
//@Redirect(method = "<clinit>", at = @At(value = "INVOKE", target = "Lio/netty/util/ResourceLeakDetector;setLevel(Lio/netty/util/ResourceLeakDetector$Level;)V"))
@Redirect(method = "<clinit>", at = @At(value = "INVOKE", target = "Lio/netty/util/ResourceLeakDetector;setLevel(Lio/netty/util/ResourceLeakDetector$Level;)V"))
private static void clinit$resourceLeakDetectorDisableConditional(ResourceLeakDetector.Level level) {
// If io.netty.leakDetection.level is defined, override the client disabling it by default.
// Otherwise, allow it to be disabled.
if (System.getProperty("io.netty.leakDetection.level") == null) {
// Allow the user to override the leak detection level in the Minecraft server with the
// io.netty.leakDetection.level system property.
ResourceLeakDetector.setLevel(level);
}
}
Expand Down

0 comments on commit 4ce2286

Please sign in to comment.