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');