diff --git a/inlong-agent/agent-core/src/main/java/org/apache/inlong/agent/core/HeartbeatManager.java b/inlong-agent/agent-core/src/main/java/org/apache/inlong/agent/core/HeartbeatManager.java index 2a16bffb0a..d436a32636 100644 --- a/inlong-agent/agent-core/src/main/java/org/apache/inlong/agent/core/HeartbeatManager.java +++ b/inlong-agent/agent-core/src/main/java/org/apache/inlong/agent/core/HeartbeatManager.java @@ -74,7 +74,6 @@ private HeartbeatManager(AgentManager agentManager) { httpManager = new HttpManager(conf); baseManagerUrl = httpManager.getBaseUrl(); reportHeartbeatUrl = buildReportHeartbeatUrl(baseManagerUrl); - createMessageSender(); } public static HeartbeatManager getInstance(AgentManager agentManager) { @@ -121,9 +120,6 @@ private Runnable heartbeatReportThread() { if (LOGGER.isDebugEnabled()) { LOGGER.debug(" {} report heartbeat to manager", heartbeatMsg); } - if (sender == null) { - createMessageSender(); - } AgentStatusManager.sendStatusMsg(sender); FileStaticManager.sendStaticMsg(sender); } catch (Throwable e) {