diff --git a/app/main/index.js b/app/main/index.js index 0a93ce0e..781f02f5 100644 --- a/app/main/index.js +++ b/app/main/index.js @@ -24,5 +24,9 @@ function init() { } app.requestSingleInstanceLock() ? init() : app.quit(); - app.on("second-instance", () => mainWindow()); + +app.on("quit", () => server.stop()); +process.on("SIGINT", () => server.stop()); +process.on("SIGTERM", () => server.stop()); +process.on("SIGKILL", () => server.stop());