diff --git a/progress.go b/progress.go index f2bb7d9..237e5a1 100644 --- a/progress.go +++ b/progress.go @@ -284,16 +284,17 @@ } case p.barCountCh <- len(bars): case <-conf.ticker.C: + var notick bool + select { // stop ticking if cancel requested - select { case <-conf.cancel: conf.ticker.Stop() - break + notick = true default: } numBars := len(bars) - if numBars == 0 { + if notick || numBars == 0 { break }