Use 'close(h.Quit)' instead of <- struct{}{}, up to 0.1.4

This commit is contained in:
jar3b 2019-06-18 01:12:42 +03:00
parent 7f494b3d57
commit f7d5b41aba

View File

@ -32,7 +32,7 @@ func (w *Waiter) terminateHandler(h *CloseHandler, forceWaitGroupDone bool) {
if h.handlerFunc != nil && *h.handlerFunc != nil { if h.handlerFunc != nil && *h.handlerFunc != nil {
(*h.handlerFunc)() (*h.handlerFunc)()
} }
h.Quit <- struct{}{} close(h.Quit)
if h.autoDone || forceWaitGroupDone { if h.autoDone || forceWaitGroupDone {
w.waitGroup.Done() w.waitGroup.Done()
} }