diff --git a/tools/ticker.go b/tools/ticker.go index 7722a8a..f9b9014 100644 --- a/tools/ticker.go +++ b/tools/ticker.go @@ -10,8 +10,8 @@ func Ticker(fn func(), interval time.Duration) chan struct{} { } ticker := time.NewTicker(interval) stopChan := make(chan struct{}) - fn() go func() { + fn() for { select { case <-ticker.C: