|
@@ -132,7 +132,7 @@ func initRenew() {
|
|
|
func renew() {
|
|
|
for {
|
|
|
time.Sleep(time.Duration(renewTurnLength) * time.Second)
|
|
|
- if localStatus == "running" && launchedFlag && !renewedFlag { // 设备处于运行状态,数采程序已启动,且尚未续约
|
|
|
+ if localStatus == "running" && launchedFlag && !renewedFlag && timeAllowedFlag && !limitReachedFlag { // 设备处于运行状态,数采程序已启动,且尚未续约
|
|
|
c_log.GlobalLogger.Info("设备仍处于运行状态,续约 - 开始。")
|
|
|
if renewTimer != nil {
|
|
|
renewTimer.Stop()
|
|
@@ -251,8 +251,6 @@ func main() {
|
|
|
} else if localStatus == "error" {
|
|
|
c_log.GlobalLogger.Error("设备运行状态出错,停止数采程序。")
|
|
|
stopMasterNode()
|
|
|
- } else {
|
|
|
- c_log.GlobalLogger.Error("未知的设备运行状态。【status】=", localStatus)
|
|
|
}
|
|
|
}
|
|
|
}
|