diff --git a/progress.go b/progress.go index 26c4ee2..b496ff4 100644 --- a/progress.go +++ b/progress.go @@ -271,7 +271,10 @@ p.cancel() // cancel all bars _, _ = fmt.Fprintln(s.debugOut, err) render = func() error { return nil } - p.once.Do(p.shutdown) + go func() { + p.bwg.Wait() + p.once.Do(p.shutdown) + }() } case <-s.shutdownNotifier: for s.heapUpdated {