Browse Source

剔除,防御多次重启阈值

hl 6 months ago
parent
commit
f25026e274
1 changed files with 7 additions and 7 deletions
  1. 7 7
      src/robot.js

+ 7 - 7
src/robot.js

@@ -327,12 +327,12 @@ async function closeApp(param) {
 async function restartApp(param) {
     var key = param.id
     var app = getApp(key)
-    var restartStatus = app.restartStatus
-    if (restartStatus !== 0) {
-        logger.info("防止重启指令 重复发送~!")
-        return
-    }
-    app.restartStatus = 1
+    // var restartStatus = app.restartStatus
+    // if (restartStatus !== 0) {
+    //     logger.info("防止重启指令 重复发送~!")
+    //     return
+    // }
+    // app.restartStatus = 1
     logger.info("--开始重启!")
     logger.info('当前app', app.id, app.threadStatus);
 
@@ -347,7 +347,7 @@ async function restartApp(param) {
     }
 
 
-    app.restartStatus = 0
+    // app.restartStatus = 0
     logger.info(`重启完成!!!!!`);
 }