Skip to content

Commit

Permalink
Merge pull request #201 from dyfllll/dev-fix
Browse files Browse the repository at this point in the history
修复进程残留
  • Loading branch information
maotoumao authored Dec 27, 2024
2 parents 410529b + 9e113c1 commit 99deea7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/shared/service-manager/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class ServiceInstance {
this.started = false;
if (!this.serviceProcess.killed) {
this.serviceProcess.removeAllListeners();
this.serviceProcess.kill(0);
this.serviceProcess.kill();
this.serviceProcess = null;
this.retryTimeOut = 6000;
this.hostChangeCallback(null);
Expand Down Expand Up @@ -113,7 +113,7 @@ class ServiceManager {
setup(windowManager: IWindowManager) {
this.windowManager = windowManager;

app.on("will-quit", () => {
app.on("before-quit", () => {
if (!windowManager.mainWindow?.isDestroyed()) {
this.serviceMap.forEach((val) => {
val.instance.stop();
Expand Down

0 comments on commit 99deea7

Please # to comment.