TD-2147
This commit is contained in:
parent
4d450cc306
commit
3acab9b55e
|
@ -148,10 +148,12 @@ static void *monitorThreadFunc(void *param) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tsMonitor.state == MON_STATE_NOT_INIT) {
|
if (tsMonitor.state == MON_STATE_NOT_INIT) {
|
||||||
|
int code = 0;
|
||||||
|
|
||||||
for (; tsMonitor.cmdIndex < MON_CMD_MAX; ++tsMonitor.cmdIndex) {
|
for (; tsMonitor.cmdIndex < MON_CMD_MAX; ++tsMonitor.cmdIndex) {
|
||||||
monitorBuildMonitorSql(tsMonitor.sql, tsMonitor.cmdIndex);
|
monitorBuildMonitorSql(tsMonitor.sql, tsMonitor.cmdIndex);
|
||||||
void *res = taos_query(tsMonitor.conn, tsMonitor.sql);
|
void *res = taos_query(tsMonitor.conn, tsMonitor.sql);
|
||||||
int code = taos_errno(res);
|
code = taos_errno(res);
|
||||||
taos_free_result(res);
|
taos_free_result(res);
|
||||||
|
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
|
@ -162,7 +164,7 @@ static void *monitorThreadFunc(void *param) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tsMonitor.start) {
|
if (tsMonitor.start && code == 0) {
|
||||||
tsMonitor.state = MON_STATE_INITED;
|
tsMonitor.state = MON_STATE_INITED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue