Commit 48def43f authored by Chris Manghane's avatar Chris Manghane

net/http: bgErr is unused; remove it

Fixes #20196.

Change-Id: Ib87f6e9e27a38f21f860b7150c818d77be653dd3
Reviewed-on: https://go-review.googlesource.com/42370Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent a93e9f0f
......@@ -623,7 +623,6 @@ type connReader struct {
mu sync.Mutex // guards following
hasByte bool
byteBuf [1]byte
bgErr error // non-nil means error happened on background read
cond *sync.Cond
inRead bool
aborted bool // set true before conn.rwc deadline is set to past
......@@ -732,11 +731,6 @@ func (cr *connReader) Read(p []byte) (n int, err error) {
cr.unlock()
return 0, io.EOF
}
if cr.bgErr != nil {
err = cr.bgErr
cr.unlock()
return 0, err
}
if len(p) == 0 {
cr.unlock()
return 0, nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment