From d7288c7130a9b6925e873be0c0e8ea76ce8f3bb7 Mon Sep 17 00:00:00 2001 From: Evstigneev Denis Date: Fri, 8 Mar 2024 16:49:49 +0300 Subject: [PATCH] remove sent to channel --- tcp.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tcp.go b/tcp.go index 94435d8..e6a8029 100644 --- a/tcp.go +++ b/tcp.go @@ -430,13 +430,12 @@ func (h *tcpServer) gracefulStop() { done := make(chan struct{}) go func() { h.opts.Wait.Wait() - done <- struct{}{} + close(done) }() select { case <-tm.C: case <-done: - close(done) } }