diff --git a/progress.go b/progress.go index 8aba481..a345922 100644 --- a/progress.go +++ b/progress.go @@ -89,6 +89,10 @@ if opt != nil { opt(s) } + } + + if s.shutdownNotifier == nil { + s.shutdownNotifier = make(chan struct{}) } p := &Progress{ @@ -373,9 +377,6 @@ func (s *pState) newTicker(done <-chan struct{}) chan time.Time { ch := make(chan time.Time) - if s.shutdownNotifier == nil { - s.shutdownNotifier = make(chan struct{}) - } go func() { var autoRefresh <-chan time.Time if !s.disableAutoRefresh {