From 71a1ed3cae49cf35bde309b00abf0d75c0ba8dfb Mon Sep 17 00:00:00 2001 From: yizhenqiang Date: Thu, 14 Dec 2023 19:12:04 +0800 Subject: [PATCH] if SSL auth policy is set to AuthPolicy.NONE, SslServerTlsHandler#decode should remove and return instead of printing the error log. (#13468) Co-authored-by: yizhenqiang --- .../remoting/transport/netty4/ssl/SslServerTlsHandler.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 408b8915a6..519c45c6de 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 @@ public class SslServerTlsHandler extends ByteToMessageDecoder { url, channelHandlerContext.channel().remoteAddress()); if (providerConnectionConfig == null) { - ChannelPipeline p = channelHandlerContext.pipeline(); - p.remove(this); + channelHandlerContext.pipeline().remove(this); return; } @@ -117,8 +116,8 @@ public class SslServerTlsHandler extends ByteToMessageDecoder { } 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.");