remove sent to channel

This commit is contained in:
Денис Евстигнеев 2024-03-08 16:49:49 +03:00
parent 8661d62ce8
commit d7288c7130

3
tcp.go
View File

@ -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)
}
}