Skip to content

Commit 1ce229f

Browse files
author
‘niuerzhuang’
committed
feature: allow data report
1 parent 8619d8f commit 1ce229f

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

dongtai-agent/src/main/java/io/dongtai/iast/agent/AgentLauncher.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,6 @@ public static void agentmain(String args, Instrumentation inst) {
152152
public static synchronized void uninstall() {
153153
EngineManager engineManager = EngineManager.getInstance();
154154
engineManager.uninstall();
155-
// 手动卸载时将线程停止
156-
MonitorDaemonThread.isExit = true;
157155
}
158156

159157
/**

dongtai-agent/src/main/java/io/dongtai/iast/agent/manager/EngineManager.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ public boolean install() {
176176
String.class)
177177
.invoke(null, launchMode, this.properties.getPropertiesFilePath(),
178178
AgentRegisterReport.getAgentId(), inst, agentPath);
179-
MonitorDaemonThread.isExit = false;
180179
return true;
181180
} catch (Throwable e) {
182181
DongTaiLog.error(ErrorCode.AGENT_REFLECTION_INSTALL_FAILED, e);

dongtai-agent/src/main/java/io/dongtai/iast/agent/monitor/impl/AgentStateMonitor.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,22 +67,19 @@ public void check() {
6767
if (null == agentState.getAllowReport()) {
6868
DongTaiLog.info("engine is not allowed to report data");
6969
agentState.setAllowReport(allowReport);
70-
return;
7170
}
7271
if (!allowReport.equals(agentState.getAllowReport())) {
7372
DongTaiLog.info("engine is not allowed to report data");
7473
agentState.setAllowReport(allowReport);
7574
engineManager.stop();
76-
return;
7775
}
7876
} else if (agentState.isAllowReport(allowReport) && !allowReport.equals(agentState.getAllowReport())) {
7977
DongTaiLog.info("engine is allowed to report data");
8078
agentState.setAllowReport(allowReport);
8179
engineManager.start();
82-
return;
8380
}
8481

85-
if (!agentState.isFallback() && !agentState.isException() && agentState.isAllowReport()) {
82+
if (!agentState.isFallback() && !agentState.isException() && agentState.isAllowReport() && agentState.isAllowReport()) {
8683
if (State.RUNNING.equals(expectState) && agentState.isPaused()) {
8784
DongTaiLog.info("engine start by server expect state");
8885
engineManager.start();

0 commit comments

Comments
 (0)