fix: 热重载

This commit is contained in:
手瓜一十雪 2024-05-20 16:58:24 +08:00
parent 6980a9f3fc
commit 36cdca5a3e

View File

@ -259,9 +259,6 @@ export class NapCatOnebot11 {
// throw new Error('Invalid configuration object');
// }
// 先设置
ob11Config.save(NewOb11);
const isHttpChanged = !isEqual(NewOb11.http.port, ob11Config.http.port) && NewOb11.http.enable;
const isHttpEnableChanged = !isEqual(NewOb11.http.enable, ob11Config.http.enable);
@ -317,6 +314,8 @@ export class NapCatOnebot11 {
ob11ReverseWebsockets.stop();
}
}
ob11Config.save(NewOb11);
} catch (e) {
logError('热重载配置失败', e);
}