mirror of
https://github.com/zadam/trilium.git
synced 2025-11-10 08:29:00 +01:00
fix(electron): port-in-use dialog shown when opening a new window
This commit is contained in:
parent
ef82c3d48b
commit
f3f07cdd28
@ -160,11 +160,10 @@ function startHttpServer(app: Express) {
|
|||||||
// should simply focus on the existing window or open a new one, without displaying an error message.
|
// should simply focus on the existing window or open a new one, without displaying an error message.
|
||||||
if ("code" in error && error.code === "EADDRINUSE" && (process.argv.includes("--new-window") || !app.requestSingleInstanceLock())) {
|
if ("code" in error && error.code === "EADDRINUSE" && (process.argv.includes("--new-window") || !app.requestSingleInstanceLock())) {
|
||||||
console.error(message);
|
console.error(message);
|
||||||
process.exit(1);
|
|
||||||
} else {
|
} else {
|
||||||
dialog.showErrorBox("Error while initializing the server", message);
|
dialog.showErrorBox("Error while initializing the server", message);
|
||||||
process.exit(1);
|
|
||||||
}
|
}
|
||||||
|
process.exit(1);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
console.error(message);
|
console.error(message);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user