From dc29946618ad1633f35e2efb3b91c59e2e6babb4 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: Thu, 6 Jun 2024 18:54:29 +0000 Subject: [PATCH] =?UTF-8?q?!175=20fix:=20=E4=BF=AE=E5=A4=8Dpnpm=20ksr?= =?UTF-8?q?=E9=87=8D=E5=90=AF=E5=A4=B1=E8=B4=A5=EF=BC=8C=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E4=B8=8D=E6=B8=85=E9=9B=B6=20*=20fix:=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8Dpnpm=20ksr=E9=87=8D=E5=90=AF=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=EF=BC=8C=E4=BF=AE=E5=A4=8D=E7=8A=B6=E6=80=81=E4=B8=8D?= =?UTF-8?q?=E6=B8=85=E9=9B=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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');