fix ssl npe (#11093)

This commit is contained in:
huazhongming 2022-12-08 16:04:28 +08:00 committed by GitHub
parent 7cccc4f193
commit 9713ad64b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -138,7 +138,9 @@ public class NettyPortUnificationServerHandler extends ByteToMessageDecoder {
private void enableSsl(ChannelHandlerContext ctx) {
ChannelPipeline p = ctx.pipeline();
p.addLast("ssl", sslCtx.newHandler(ctx.alloc()));
if (sslCtx != null) {
p.addLast("ssl", sslCtx.newHandler(ctx.alloc()));
}
p.addLast("unificationA",
new NettyPortUnificationServerHandler(url, sslCtx, false, protocols,
handler, dubboChannels, urlMapper, handlerMapper));