From 75b43e40e5fff6b1d5b8d28489a904bb51836ffc Mon Sep 17 00:00:00 2001 From: Yutousama <583819556@qq.com> Date: Mon, 25 Jul 2022 12:58:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E8=88=B0R=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E5=A4=9A=E8=B0=83=E7=94=A8=E4=BA=86=E4=B8=80=E6=AC=A1?= =?UTF-8?q?start?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yutou/qqbot/Controllers/JianRScriptController.java | 1 - src/main/java/com/yutou/qqbot/utlis/JianRTaskManager.java | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) 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() {