Correct Close() check in Server.serve (#932)

This was changed in ec3443f85d, but I
missed this function. Apparently no one noticed.
This commit is contained in:
Tom Thorogood 2019-03-10 22:29:36 +10:30 committed by Miek Gieben
parent eef2495fa3
commit 53b8a87e14
1 changed files with 1 additions and 1 deletions

View File

@ -523,7 +523,7 @@ func (srv *Server) serve(w *response, wg *sync.WaitGroup) {
break
}
srv.serveDNS(w)
if w.tcp == nil {
if w.closed {
break // Close() was called
}
if w.hijacked {