Codebase list golang-github-vbauerster-mpb / 6bf48a6
invoke shutdownListeners before close(b.done) Vladimir Bauer 4 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
299299 case op := <-b.operateState:
300300 op(s)
301301 case <-ctx.Done():
302 b.cacheState = s
303 close(b.done)
304302 // Notifying decorators about shutdown event
305303 for _, sl := range s.shutdownListeners {
306304 sl.Shutdown()
307305 }
306 b.cacheState = s
307 close(b.done)
308308 return
309309 }
310310 }