Skip to content

Commit

Permalink
pkg/controller: set runFunc to when controller is manually triggered
Browse files Browse the repository at this point in the history
`runFunc` should be set to true when the controller is manually
triggered otherwise the controller might never be executed in the case
where its run interval is zero.

Fixes: c61d02f ("controller: allow to manually trigger it")
Signed-off-by: André Martins <andre@cilium.io>
  • Loading branch information
aanm committed Aug 23, 2021
1 parent 5949ae4 commit 4ebcc27
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ func (c *Controller) runController() {

case <-runTimer.After(interval):
case <-c.trigger:
runFunc = true
}

}
Expand Down

0 comments on commit 4ebcc27

Please sign in to comment.