diff --git a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/ssl/SslServerTlsHandler.java b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/ssl/SslServerTlsHandler.java index 408b8915a6b..519c45c6de9 100644 --- a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/ssl/SslServerTlsHandler.java +++ b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/ssl/SslServerTlsHandler.java @@ -105,8 +105,7 @@ protected void decode(ChannelHandlerContext channelHandlerContext, ByteBuf byteB url, channelHandlerContext.channel().remoteAddress()); if (providerConnectionConfig == null) { - ChannelPipeline p = channelHandlerContext.pipeline(); - p.remove(this); + channelHandlerContext.pipeline().remove(this); return; } @@ -117,8 +116,8 @@ protected void decode(ChannelHandlerContext channelHandlerContext, ByteBuf byteB } if (providerConnectionConfig.getAuthPolicy() == AuthPolicy.NONE) { - ChannelPipeline p = channelHandlerContext.pipeline(); - p.remove(this); + channelHandlerContext.pipeline().remove(this); + return; } logger.error(INTERNAL_ERROR, "", "", "TLS negotiation failed when trying to accept new connection.");