diff --git a/src/main/java/com/yutou/qqbot/Controllers/JianRScriptController.java b/src/main/java/com/yutou/qqbot/Controllers/JianRScriptController.java index df0b227..2dd7654 100644 --- a/src/main/java/com/yutou/qqbot/Controllers/JianRScriptController.java +++ b/src/main/java/com/yutou/qqbot/Controllers/JianRScriptController.java @@ -30,7 +30,6 @@ public class JianRScriptController { } manager.setTask(script); manager.start(); - manager.start(); json.put("code", 0); json.put("msg", "任务创建成功"); } diff --git a/src/main/java/com/yutou/qqbot/utlis/JianRTaskManager.java b/src/main/java/com/yutou/qqbot/utlis/JianRTaskManager.java index 4206c68..32c44b5 100644 --- a/src/main/java/com/yutou/qqbot/utlis/JianRTaskManager.java +++ b/src/main/java/com/yutou/qqbot/utlis/JianRTaskManager.java @@ -31,6 +31,9 @@ public class JianRTaskManager { } public void start() { + if(running){ + return; + } running = true; new Thread(new Runnable() {