remove sent to channel
This commit is contained in:
parent
8661d62ce8
commit
d7288c7130
3
tcp.go
3
tcp.go
@ -430,13 +430,12 @@ func (h *tcpServer) gracefulStop() {
|
|||||||
done := make(chan struct{})
|
done := make(chan struct{})
|
||||||
go func() {
|
go func() {
|
||||||
h.opts.Wait.Wait()
|
h.opts.Wait.Wait()
|
||||||
done <- struct{}{}
|
close(done)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
select {
|
select {
|
||||||
case <-tm.C:
|
case <-tm.C:
|
||||||
case <-done:
|
case <-done:
|
||||||
close(done)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user