优化注册重试

This commit is contained in:
gaoyutao
2025-12-26 18:32:03 +08:00
parent 13968d60aa
commit 2ad6ea2ad5
2 changed files with 2 additions and 2 deletions
@@ -143,7 +143,7 @@ public class AgentDecoderHandler extends ChannelInboundHandlerAdapter {
}
byteBuf.release(); // 释放 ByteBuf 资源(重要!)
} else {
System.out.println("Unexpected message type: " + msg.getClass());
AssertLog.error("Unexpected message type: " + msg.getClass());
}
}
@@ -781,7 +781,7 @@ public class BusinessTasks {
boolean success = true;
int activeConnect = client.getActiveConnections();
AssertLog.info("注册重试定时任务执行 - 时间: {}activeConnect={}", LocalDateTime.now(), activeConnect);
if(activeConnect == 0){
if(activeConnect == 0 || count > 1){
success = agentService.connection();
}
if(success){