diff --git a/transport/src/main/java/io/netty/channel/local/LocalChannel.java b/transport/src/main/java/io/netty/channel/local/LocalChannel.java index c0bcfcae09..d656c2a1e6 100644 --- a/transport/src/main/java/io/netty/channel/local/LocalChannel.java +++ b/transport/src/main/java/io/netty/channel/local/LocalChannel.java @@ -179,7 +179,9 @@ public class LocalChannel extends AbstractChannel { return; } - LocalChannelRegistry.unregister(localAddress); + if (parent() == null) { + LocalChannelRegistry.unregister(localAddress); + } localAddress = null; state = 3; if (peer.isActive()) {