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 <yizhenqiang@corp.netesase.com>
This commit is contained in:
yizhenqiang 2023-12-14 19:12:04 +08:00 committed by GitHub
parent 3e2d69f80f
commit 71a1ed3cae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -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.");