diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/api/PortUnificationServerHandler.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/api/PortUnificationServerHandler.java index 634b40631326..50fb0b8d5401 100644 --- a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/api/PortUnificationServerHandler.java +++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/api/PortUnificationServerHandler.java @@ -109,7 +109,9 @@ protected void decode(ChannelHandlerContext ctx, ByteBuf in, List out) 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 PortUnificationServerHandler(url, sslCtx, false, protocols, channels)); p.remove(this);