diff options
Diffstat (limited to 'pkg/gui/gui.go')
-rw-r--r-- | pkg/gui/gui.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index c419f5dc9..d735b8418 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -788,9 +788,11 @@ func (gui *Gui) renderGlobalOptions() error { func (gui *Gui) goEvery(interval time.Duration, stop chan struct{}, function func() error) { go func() { + ticker := time.NewTicker(interval) + defer ticker.Stop() for { select { - case <-time.Tick(interval): + case <-ticker.C: _ = function() case <-stop: return |