Pre Merge pull request !175 from 千奈千祁/N/A
This commit is contained in:
commit
17abfc256c
|
@ -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