diff --git a/progress.go b/progress.go index 30294f5..a97416b 100644 --- a/progress.go +++ b/progress.go @@ -263,7 +263,6 @@ var lineCount int for s.bHeap.Len() > 0 { bar := heap.Pop(s.bHeap).(*Bar) - frame := <-bar.frameCh defer func() { if bar.toShutdown { // shutdown at next flush, in other words decrement underlying WaitGroup @@ -282,7 +281,7 @@ } heap.Push(s.bHeap, bar) }() - cw.ReadFrom(frame) + cw.ReadFrom(<-bar.frameCh) lineCount += bar.extendedLines + 1 }