mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-21 23:01:03 +00:00
Merge pull request #191 from CallanTaylor/stop-ticker
Defer stop ticker
This commit is contained in:
commit
14f27e86c8
1 changed files with 1 additions and 0 deletions
|
|
@ -118,6 +118,7 @@ func (t *TaskManager) NewTickerTask(duration time.Duration, before func(stop cha
|
|||
before(stop)
|
||||
}
|
||||
tickChan := time.NewTicker(duration)
|
||||
defer tickChan.Stop()
|
||||
// calling f first so that we're not waiting for the first tick
|
||||
f(stop, notifyStopped)
|
||||
for {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue