diff --git a/src/net/http/transport.go b/src/net/http/transport.go index 41fc6d0e62..41e02fc580 100644 --- a/src/net/http/transport.go +++ b/src/net/http/transport.go @@ -975,6 +975,7 @@ func (pc *persistConn) readLoop() { // the underlying bufio reader. select { case <-rc.req.Cancel: + alive = false pc.t.CancelRequest(rc.req) case bodyEOF := <-waitForBodyRead: pc.t.setReqCanceler(rc.req, nil) // before pc might return to idle pool