fix(electron): allow explicit quit with active connections (#1522)

This commit is contained in:
ZacharyZcR authored and GitHub committed 2026-09-30 09:47:26 -05:00
1 parent 4c2f54dac0
commit 5860921cbe
2 files changed
+103

No files matched your search

+6
View File
@@ -1546,6 +1546,12 @@ function createWindow() {
console.log("Frontend loaded successfully");
});
mainWindow.webContents.on("will-prevent-unload", (event) => {
// Explicit Quit must not be vetoed by the renderer's connection guard.
// In this Electron event, preventDefault allows the unload to proceed.
if (isQuitting) event.preventDefault();
});
mainWindow.on("close", (event) => {
if (!isQuitting && tray && !tray.isDestroyed()) {
event.preventDefault();