[client] Reset the updater mode on engine stop

Removing SetDownloadOnly from the engine teardown also dropped the reset of
the forced-update flag. After netbird down the manager kept the last
management directive, so a release published while the client was stopped
could still trigger a forced install that management no longer asked for.
The same window existed between an engine teardown and the next reconnect
attempt, where ResetMode only ran at the start of the attempt.

Reset the mode in stopLocked instead, so the updater stays silent from the
moment the engine goes down until the first network map of the next
connection decides the mode again.
This commit is contained in:
Zoltán Papp
2026-09-23 10:37:02 +02:00
parent d2eeb0a1f4
commit 38d7b35c8e
3 changed files with 73 additions and 4 deletions
+4
View File
@@ -455,6 +455,10 @@ func (e *Engine) stopLocked() {
e.sessionWatcher.Close()
}
if e.updateManager != nil {
e.updateManager.ResetMode()
}
log.Info("cleaning up status recorder states")
e.statusRecorder.ReplaceOfflinePeers([]peer.State{})
e.statusRecorder.UpdateDNSStates([]peer.NSGroupState{})