Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Beaumont <[email protected]>
  • Loading branch information
michaelbeaumont committed Jul 11, 2023
1 parent 044d838 commit 76662ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/util/watchdog/watchdog.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ func (w *SimpleWatchdog) Start(stop <-chan struct{}) {
go func() {
<-stop
cancel()
if w.OnStop != nil {
w.OnStop()
}
}()
select {
case <-ticker.C:
if err := w.onTick(ctx); err != nil {
w.OnError(err)
}
case <-stop:
if w.OnStop != nil {
w.OnStop()
}
return
}
}
Expand Down

0 comments on commit 76662ce

Please sign in to comment.