Catch exeptions in Lightning stats

fixes #3486
This commit is contained in:
softsimon
2023-03-20 20:46:11 +09:00
parent e6bc5bef33
commit e3109a8fec
2 changed files with 11 additions and 8 deletions

View File

@@ -215,11 +215,11 @@ class Server {
await lightningStatsUpdater.$startService();
await forensicsService.$startService();
} catch(e) {
logger.err(`Nodejs lightning backend crashed. Restarting in 1 minute. Reason: ${(e instanceof Error ? e.message : e)}`);
logger.err(`Exception in $runLightningBackend. Restarting in 1 minute. Reason: ${(e instanceof Error ? e.message : e)}`);
await Common.sleep$(1000 * 60);
this.$runLightningBackend();
};
}
}
setUpWebsocketHandling(): void {
if (this.wss) {