Skip to content

Commit

Permalink
fix: kill the api subprocess when exiting
Browse files Browse the repository at this point in the history
  • Loading branch information
aentwist committed Jul 18, 2024
1 parent 4c8ee3b commit b545cc2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ui/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,8 @@ export class Api {
browserWindow.webContents.send("message", message);
});
}

kill(): void {
this.api.kill();
}
}
2 changes: 2 additions & 0 deletions ui/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ app.on("ready", () => {
// explicitly with Cmd + Q.
app.on("window-all-closed", () => {
if (process.platform !== "darwin") {
// TODO: Might need to kill elsewhere for macOS
Api.getInstance().kill();
app.quit();
}
});
Expand Down

0 comments on commit b545cc2

Please sign in to comment.