Skip to content

Commit

Permalink
fix: will not kill api process on macos closed
Browse files Browse the repository at this point in the history
  • Loading branch information
little-buddy committed Dec 23, 2023
1 parent 7fdac0a commit 5200482
Show file tree
Hide file tree
Showing 3 changed files with 280 additions and 533 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,4 @@
"vite-plugin-importer": "^0.2.5",
"vite-plugin-md2vue": "^1.1.1"
}
}
}
2 changes: 2 additions & 0 deletions src/electron/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ async function createWindow() {
infoMain('close')
if (process.platform === 'darwin') {
if (appQuitting) {
const killed = serviceInstance.kill('SIGINT')
infoMain(`service kill ${killed ? 'success' : 'fail'}`)
win = null
} else if (win !== null) {
event.preventDefault()
Expand Down
Loading

0 comments on commit 5200482

Please sign in to comment.