Skip to content

Commit

Permalink
Merge pull request #66 from zhupengfeivip/master
Browse files Browse the repository at this point in the history
重连时启动时,有断开的连接才打印,解决每次启动都会打印一个error
  • Loading branch information
tywo45 authored May 31, 2024
2 parents e9616e1 + 0c69a50 commit b0721e1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/src/main/java/org/tio/client/TioClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<ChannelContext> queue = reconnConf.getQueue();
ClientChannelContext channelContext = null;
Expand Down

0 comments on commit b0721e1

Please sign in to comment.