From c032e2ebf9250bfa1ab18324356ed13b6666e4f7 Mon Sep 17 00:00:00 2001 From: Kun Zhang Date: Fri, 13 Dec 2019 10:48:53 -0800 Subject: [PATCH] Revert "netty: enable io.grpc.netty.useCustomAllocator by default (#6459)" (#6517) This reverts commit b0e00fd4bad58350bafbb0411b94c70979f7d3e1. It may cause leak of netty native buffers when creating and shutting down Channels on a regular basis. --- netty/src/main/java/io/grpc/netty/Utils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netty/src/main/java/io/grpc/netty/Utils.java b/netty/src/main/java/io/grpc/netty/Utils.java index 6fb6e49779..df8d7a51cc 100644 --- a/netty/src/main/java/io/grpc/netty/Utils.java +++ b/netty/src/main/java/io/grpc/netty/Utils.java @@ -91,7 +91,7 @@ class Utils { @Override public ByteBufAllocator create() { if (Boolean.parseBoolean( - System.getProperty("io.grpc.netty.useCustomAllocator", "true"))) { + System.getProperty("io.grpc.netty.useCustomAllocator", "false"))) { int maxOrder; if (System.getProperty("io.netty.allocator.maxOrder") == null) { // See the implementation of PooledByteBufAllocator. DEFAULT_MAX_ORDER in there is