Skip to content

Commit

Permalink
#705 wait all inflight requests
Browse files Browse the repository at this point in the history
  • Loading branch information
smallnest committed Mar 22, 2022
1 parent 3c4d76f commit 742b7da
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,14 +245,11 @@ func (s *Server) serveListener(ln net.Listener) error {
for {
conn, e := ln.Accept()
if e != nil {
select {
case <-s.getDoneChan():
if s.isShutdown() {
<-s.doneChan
return ErrServerClosed
default:
}

<-s.doneChan

if ne, ok := e.(net.Error); ok && ne.Temporary() {
if tempDelay == 0 {
tempDelay = 5 * time.Millisecond
Expand Down

0 comments on commit 742b7da

Please sign in to comment.