mirror of
https://github.com/zadam/trilium.git
synced 2025-11-09 16:08:58 +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.
|
||||
if ("code" in error && error.code === "EADDRINUSE" && (process.argv.includes("--new-window") || !app.requestSingleInstanceLock())) {
|
||||
console.error(message);
|
||||
process.exit(1);
|
||||
} else {
|
||||
dialog.showErrorBox("Error while initializing the server", message);
|
||||
process.exit(1);
|
||||
}
|
||||
process.exit(1);
|
||||
});
|
||||
} else {
|
||||
console.error(message);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user