fix(gui): show restarting modal during upgrade restart (fixes #1248) (#10566)

Signed-off-by: steadytao <mail@steadytao.com>
Signed-off-by: Jakob Borg <jakob@kastelo.net>
Co-authored-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
Tao
2026-02-11 09:46:37 +00:00
committed by GitHub
co-authored by Jakob Borg
parent 5cf9168dc2
commit f86c1d83db
4 changed files with 60 additions and 2 deletions
+6 -1
View File
@@ -748,8 +748,13 @@ func autoUpgrade(cfg config.Wrapper, app *syncthing.App, evLogger events.Logger)
continue
}
sub.Unsubscribe()
restartDelay := time.Minute
evLogger.Log(events.UpgradeRestartScheduled, map[string]any{
"delayS": int(restartDelay / time.Second),
"newVersion": rel.Tag,
})
slog.Error("Automatically upgraded, restarting in 1 minute", slog.String("newVersion", rel.Tag))
time.Sleep(time.Minute)
time.Sleep(restartDelay)
app.Stop(svcutil.ExitUpgrade)
return
}