Skip to content

Commit a607986

Browse files
committed
Desktop: Fixes laurent22#11975: Regression: Restarting app is broken
1 parent 2fdbb22 commit a607986

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

packages/app-desktop/ElectronAppWrapper.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,9 @@ export default class ElectronAppWrapper {
632632
}
633633

634634
if (callingAppGone) {
635+
// Wait a bit more because even if the app is not responding, the process
636+
// might still be there for a short while.
637+
await msleep(1000);
635638
this.ipcLogger_.warn('restartAltInstance: App is gone - restarting it');
636639
void bridge().launchNewAppInstance(this.env());
637640
} else {

packages/app-desktop/bridge.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ export class Bridge {
572572
app.relaunch();
573573
}
574574

575-
app.exit();
575+
this.electronApp().exit();
576576
}
577577

578578
public createImageFromPath(path: string) {

0 commit comments

Comments
 (0)