diff --git a/src/core/src/main/java/org/tio/client/TioClient.java b/src/core/src/main/java/org/tio/client/TioClient.java index 41e4d86..2d699d2 100644 --- a/src/core/src/main/java/org/tio/client/TioClient.java +++ b/src/core/src/main/java/org/tio/client/TioClient.java @@ -546,7 +546,10 @@ private void startReconnTask() { @Override public void run() { while (!tioClientConfig.isStopped()) { - log.error("closeds:{}, connections:{}", tioClientConfig.closeds.size(), tioClientConfig.connections.size()); + if (tioClientConfig.closeds.size() > 0) { + // 有连接断开时才打印日志 + log.error("closeds:{}, connections:{}", tioClientConfig.closeds.size(), tioClientConfig.connections.size()); + } //log.info("准备重连"); LinkedBlockingQueue queue = reconnConf.getQueue(); ClientChannelContext channelContext = null;