Explorar o código

剔除,防御多次重启阈值

hl hai 6 meses
pai
achega
f25026e274
Modificáronse 1 ficheiros con 7 adicións e 7 borrados
  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(`重启完成!!!!!`);
 }