fix(desktop): stop daemon before auto-update restart
The daemon is a detached process that survives Electron restarts, so after an auto-update the old daemon version would keep running. Now we stop it before quitAndInstall so the new app instance starts a fresh daemon with the updated binary.
This commit is contained in:
@@ -548,7 +548,9 @@ export function createDaemonCommandHandlers(): Record<string, DesktopCommandHand
|
||||
},
|
||||
install_app_update: async () => {
|
||||
const currentVersion = await resolveCurrentUpdateVersion();
|
||||
return downloadAndInstallUpdate(currentVersion);
|
||||
return downloadAndInstallUpdate(currentVersion, async () => {
|
||||
await stopDaemon();
|
||||
});
|
||||
},
|
||||
get_local_daemon_version: () => getLocalDaemonVersion(),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user