diff --git a/progress.go b/progress.go index 03eef8d..b4e6fc7 100644 --- a/progress.go +++ b/progress.go @@ -340,6 +340,7 @@ go func(listenCh <-chan int, resultCh chan<- int) { defer close(resultCh) widths := make([]int, 0, numBars) + abandon := time.After(userRR) loop: for { select { @@ -348,7 +349,7 @@ if len(widths) == numBars { break loop } - case <-time.After(userRR): + case <-abandon: return } }