diff --git a/waiter.go b/waiter.go index 9d445db..d5a5c60 100644 --- a/waiter.go +++ b/waiter.go @@ -32,7 +32,7 @@ func (w *Waiter) terminateHandler(h *CloseHandler, forceWaitGroupDone bool) { if h.handlerFunc != nil && *h.handlerFunc != nil { (*h.handlerFunc)() } - h.Quit <- struct{}{} + close(h.Quit) if h.autoDone || forceWaitGroupDone { w.waitGroup.Done() }