-
Fix self-update restart: app never came back after "Обновить"
release / Build Windows .zip (push) Canceled after 0sreleased this
2026-05-28 21:49:47 +03:00 | 47 commits to main since this releaseTwo compounding bugs in RestartApp:
-
Single-instance race. We launched the new exe and only exited 500ms
later. The new process started while we still held the Wails
SingleInstanceLock mutex, so it saw "another instance running",
handed off, and exited — then we exited too, leaving nothing. Now
the relaunch is delegated to a detachedcmd /c ping -n 3 & start "" exethat waits ~2s for us to fully exit (releasing the mutex)
before starting the new binary. -
Relaunching the .old binary. minio/selfupdate renames the running
image to ".old" and writes the new binary at the original path;
os.Executable() can report the .old path. We now strip a trailing
.old so we always relaunch the freshly-installed binary.
This also explains "autodetect died": failed restarts left the user on
a stale/dev binary whose version check short-circuits. Once an update
restarts cleanly onto a tagged build, the 30-min auto-check resumes.Downloads
-