mirror of https://github.com/golang/go.git
net/http: check server shutting down before processing the request
This commit is contained in:
parent
5c92f43c51
commit
426099a3e7
|
|
@ -1966,6 +1966,9 @@ func (c *conn) serve(ctx context.Context) {
|
|||
// If we read any bytes off the wire, we're active.
|
||||
c.setState(c.rwc, StateActive, runHooks)
|
||||
}
|
||||
if c.server.shuttingDown() {
|
||||
return
|
||||
}
|
||||
if err != nil {
|
||||
const errorHeaders = "\r\nContent-Type: text/plain; charset=utf-8\r\nConnection: close\r\n\r\n"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue