Skip to content

Commit

Permalink
fix: respect streak
Browse files Browse the repository at this point in the history
  • Loading branch information
soerenschneider committed Jul 19, 2023
1 parent 69169a5 commit 1b97738
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/agent/state/ok.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ func (s *NoRebootNeeded) Success() {
}

func (s *NoRebootNeeded) Failure() {
s.stateful.SetState(&RebootNeeded{stateful: s.stateful})
if s.stateful.StreakUntilRebootState() > 1 {
s.stateful.SetState(NewUncertainState(s.stateful))
} else {
s.stateful.SetState(&RebootNeeded{stateful: s.stateful})
}
}

func (s *NoRebootNeeded) Error(err error) {
Expand Down

0 comments on commit 1b97738

Please sign in to comment.