mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-22 07:11:01 +00:00
Defer stop ticker
This commit is contained in:
parent
450d163040
commit
58d1eef502
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