mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-21 16:38:23 +01:00
fix rare bad shutdown loop with logger throwing errors (#1001)
This commit is contained in:
parent
4f00595311
commit
9ad8068d13
@ -997,8 +997,9 @@ process.on("uncaughtException", (error) => {
|
||||
if (caughtException) {
|
||||
return;
|
||||
}
|
||||
logger.error("Uncaught Exception, shutting down: ", error);
|
||||
caughtException = true;
|
||||
console.log("Uncaught Exception, shutting down: ", error);
|
||||
console.log("Stack Trace:", error.stack);
|
||||
// Optionally, handle cleanup or exit the app
|
||||
electronApp.quit();
|
||||
});
|
||||
@ -1033,12 +1034,6 @@ async function relaunchBrowserWindows(): Promise<void> {
|
||||
}
|
||||
}
|
||||
|
||||
process.on("uncaughtException", (error) => {
|
||||
console.error("Uncaught Exception:", error);
|
||||
console.error("Stack Trace:", error.stack);
|
||||
electron.app.quit();
|
||||
});
|
||||
|
||||
async function appMain() {
|
||||
// Set disableHardwareAcceleration as early as possible, if required.
|
||||
const launchSettings = getLaunchSettings();
|
||||
|
Loading…
Reference in New Issue
Block a user