diff --git a/bar.go b/bar.go index 3b5cebd..6d40b0a 100644 --- a/bar.go +++ b/bar.go @@ -644,11 +644,11 @@ for i := 0; i < len(s.shutdownListeners); i++ { switch d := s.shutdownListeners[i]; i { case len(s.shutdownListeners) - 1: - d.Shutdown() + d.OnShutdown() default: wg.Add(1) go func() { - d.Shutdown() + d.OnShutdown() wg.Done() }() } diff --git a/decor/decorator.go b/decor/decorator.go index 90e1d6c..e60d37e 100644 --- a/decor/decorator.go +++ b/decor/decorator.go @@ -113,7 +113,7 @@ // If decorator needs to be notified once upon bar shutdown event, so // this is the right interface to implement. type ShutdownListener interface { - Shutdown() + OnShutdown() } // Global convenience instances of WC with sync width bit set.