From e4a0eb7524545559a89684ded411e0db4a744b82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=83=E5=A5=88=E5=8D=83=E7=A5=81?= <2632139786@qq.com> Date: Mon, 3 Jun 2024 10:06:12 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dpnpm=20ksr=E9=87=8D?= =?UTF-8?q?=E5=90=AF=E5=A4=B1=E8=B4=A5=EF=BC=8C=E4=BF=AE=E5=A4=8D=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E4=B8=8D=E6=B8=85=E9=9B=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 千奈千祁 <2632139786@qq.com> --- lib/plugins/loader.js | 1 + lib/tools/ksr.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/plugins/loader.js b/lib/plugins/loader.js index 0bb6854..432a4eb 100644 --- a/lib/plugins/loader.js +++ b/lib/plugins/loader.js @@ -83,6 +83,7 @@ class PluginsLoader { * @param isRefresh 是否刷新 */ async load(isRefresh = false) { + this.delCount() if (isRefresh) this.priority = [] if (this.priority.length) return diff --git a/lib/tools/ksr.js b/lib/tools/ksr.js index 9093833..e806a82 100644 --- a/lib/tools/ksr.js +++ b/lib/tools/ksr.js @@ -36,10 +36,10 @@ const serverHttpexit = http.createServer(async (req, res) => { return } if (req.url === `/restart`) { - await serverProcess.kill(); - await startServer(); res.writeHead(200, { 'Content-Type': 'text/plain' }); res.end('OK\n'); + await serverProcess.kill(); + await startServer(); } else if (req.url === `/exit`) { res.writeHead(200, { 'Content-Type': 'text/plain' }); res.end('OK\n'); -- Gitee