!175 fix: 修复pnpm ksr重启失败,修复状态不清零

* fix: 修复pnpm ksr重启失败,修复状态不清零
This commit is contained in:
千奈千祁 2024-06-06 18:54:29 +00:00 committed by Kokomi
parent 5f27cf1152
commit dc29946618
2 changed files with 3 additions and 2 deletions

View File

@ -83,6 +83,7 @@ class PluginsLoader {
* @param isRefresh 是否刷新
*/
async load(isRefresh = false) {
this.delCount()
if (isRefresh) this.priority = []
if (this.priority.length) return

View File

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