fix: 修复pnpm ksr重启失败,修复状态不清零
Signed-off-by: 千奈千祁 <2632139786@qq.com>
This commit is contained in:
parent
72ea0081d5
commit
e4a0eb7524
|
@ -83,6 +83,7 @@ class PluginsLoader {
|
||||||
* @param isRefresh 是否刷新
|
* @param isRefresh 是否刷新
|
||||||
*/
|
*/
|
||||||
async load(isRefresh = false) {
|
async load(isRefresh = false) {
|
||||||
|
this.delCount()
|
||||||
if (isRefresh) this.priority = []
|
if (isRefresh) this.priority = []
|
||||||
if (this.priority.length) return
|
if (this.priority.length) return
|
||||||
|
|
||||||
|
|
|
@ -36,10 +36,10 @@ const serverHttpexit = http.createServer(async (req, res) => {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (req.url === `/restart`) {
|
if (req.url === `/restart`) {
|
||||||
await serverProcess.kill();
|
|
||||||
await startServer();
|
|
||||||
res.writeHead(200, { 'Content-Type': 'text/plain' });
|
res.writeHead(200, { 'Content-Type': 'text/plain' });
|
||||||
res.end('OK\n');
|
res.end('OK\n');
|
||||||
|
await serverProcess.kill();
|
||||||
|
await startServer();
|
||||||
} else if (req.url === `/exit`) {
|
} else if (req.url === `/exit`) {
|
||||||
res.writeHead(200, { 'Content-Type': 'text/plain' });
|
res.writeHead(200, { 'Content-Type': 'text/plain' });
|
||||||
res.end('OK\n');
|
res.end('OK\n');
|
||||||
|
|
Loading…
Reference in New Issue