Skip to content

Commit

Permalink
fix: Kill HTTP server on app quit (#143)
Browse files Browse the repository at this point in the history
Close #143
  • Loading branch information
giboow authored Feb 10, 2021
1 parent 0abdfdb commit 57b01f2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());

0 comments on commit 57b01f2

Please sign in to comment.