Skip to content

Commit

Permalink
autopilot: check for shutdown first
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjan committed Feb 6, 2024
1 parent 0670aff commit 4a1567d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions autopilot/autopilot.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,10 @@ func (ap *Autopilot) Run() error {
select {
case <-ap.shutdownCtx.Done():
return nil
default:
}

select {
case forceScan = <-ap.triggerChan:
ap.logger.Info("autopilot iteration triggered")
ap.ticker.Reset(ap.tickerDuration)
Expand Down

0 comments on commit 4a1567d

Please sign in to comment.