From f7d5b41aba4f566cf655d60cc88ec0857157c95d Mon Sep 17 00:00:00 2001 From: jar3b Date: Tue, 18 Jun 2019 01:12:42 +0300 Subject: [PATCH] Use 'close(h.Quit)' instead of <- struct{}{}, up to 0.1.4 --- waiter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() }