From 288b1eee0cea58517d387b570c3bfdf8a0d403d1 Mon Sep 17 00:00:00 2001 From: hengyunabc Date: Tue, 3 Nov 2020 01:02:00 +0800 Subject: [PATCH] fix testcase. #1561 --- .../java/com/taobao/arthas/core/server/ArthasBootstrap.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/taobao/arthas/core/server/ArthasBootstrap.java b/core/src/main/java/com/taobao/arthas/core/server/ArthasBootstrap.java index 058244e7..087a3f03 100644 --- a/core/src/main/java/com/taobao/arthas/core/server/ArthasBootstrap.java +++ b/core/src/main/java/com/taobao/arthas/core/server/ArthasBootstrap.java @@ -342,13 +342,13 @@ public class ArthasBootstrap { workerGroup = new NioEventLoopGroup(new DefaultThreadFactory("arthas-TermServer", true)); // TODO: discover user provided command resolver - if (configure.getTelnetPort() > 0) { + if (configure.getTelnetPort() != null && configure.getTelnetPort() > 0) { shellServer.registerTermServer(new HttpTelnetTermServer(configure.getIp(), configure.getTelnetPort(), options.getConnectionTimeout(), workerGroup)); } else { logger().info("telnet port is {}, skip bind telnet server.", configure.getTelnetPort()); } - if (configure.getHttpPort() > 0) { + if (configure.getHttpPort() != null && configure.getHttpPort() > 0) { shellServer.registerTermServer(new HttpTermServer(configure.getIp(), configure.getHttpPort(), options.getConnectionTimeout(), workerGroup)); } else {