diff --git a/core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/HttpRequestHandler.java b/core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/HttpRequestHandler.java index 043232ecb8..dd6e2c08de 100644 --- a/core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/HttpRequestHandler.java +++ b/core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/HttpRequestHandler.java @@ -76,11 +76,13 @@ protected void channelRead0(ChannelHandlerContext ctx, FullHttpRequest request) } //handle mcp request - String mcpEndpoint = mcpRequestHandler.getMcpEndpoint(); - if (mcpEndpoint.equals(path)) { - mcpRequestHandler.handle(ctx, request); - isMcpHandled = true; - return; + if (mcpRequestHandler != null) { + String mcpEndpoint = mcpRequestHandler.getMcpEndpoint(); + if (mcpEndpoint.equals(path)) { + mcpRequestHandler.handle(ctx, request); + isMcpHandled = true; + return; + } } //handle webui requests