fix: 热重载容错
This commit is contained in:
1 parent
252358ed66
commit
26e224f852
1 file changed
+5
@@ -208,6 +208,7 @@ export class NapCatOnebot11 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
async SetConfig(NewOb11: OB11Config) {
|
async SetConfig(NewOb11: OB11Config) {
|
||||||
|
try {
|
||||||
function isEqual(obj1: any, obj2: any) {
|
function isEqual(obj1: any, obj2: any) {
|
||||||
if (obj1 === obj2) return true;
|
if (obj1 === obj2) return true;
|
||||||
if (obj1 == null || obj2 == null) return false;
|
if (obj1 == null || obj2 == null) return false;
|
||||||
@@ -272,6 +273,10 @@ export class NapCatOnebot11 {
|
|||||||
httpHeart.stop();
|
httpHeart.stop();
|
||||||
}
|
}
|
||||||
ob11Config.save(NewOb11);
|
ob11Config.save(NewOb11);
|
||||||
|
} catch (e) {
|
||||||
|
logError('热重载配置失败', e);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
async postGroupNotifies(notifies: GroupNotify[]) {
|
async postGroupNotifies(notifies: GroupNotify[]) {
|
||||||
for (const notify of notifies) {
|
for (const notify of notifies) {
|
||||||
|
|||||||
Reference in new issue
Block a user