diff --git a/bar.go b/bar.go index ae9feeb..86a17b0 100644 --- a/bar.go +++ b/bar.go @@ -300,12 +300,12 @@ case op := <-b.operateState: op(s) case <-ctx.Done(): - b.cacheState = s - close(b.done) // Notifying decorators about shutdown event for _, sl := range s.shutdownListeners { sl.Shutdown() } + b.cacheState = s + close(b.done) return } }