Skip to content

Commit 79cb2aa

Browse files
ymCopilot
andauthored
fix(ota): set updating to false when no updates are available (jetkvm#996)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 9c4a9e1 commit 79cb2aa

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

internal/ota/ota.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,13 @@ func (s *State) doUpdate(ctx context.Context, params UpdateParams) error {
228228
s.triggerComponentUpdateState("system", systemUpdate)
229229
}
230230

231+
if !appUpdate.pending && !systemUpdate.pending {
232+
scopedLogger.Info().Msg("No updates available")
233+
s.updating = false
234+
s.triggerStateUpdate()
235+
return nil
236+
}
237+
231238
scopedLogger.Trace().Bool("pending", appUpdate.pending).Msg("Checking for app update")
232239

233240
if appUpdate.pending {

0 commit comments

Comments
 (0)