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: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent a93e9f0f
...@@ -623,7 +623,6 @@ type connReader struct { ...@@ -623,7 +623,6 @@ type connReader struct {
mu sync.Mutex // guards following mu sync.Mutex // guards following
hasByte bool hasByte bool
byteBuf [1]byte byteBuf [1]byte
bgErr error // non-nil means error happened on background read
cond *sync.Cond cond *sync.Cond
inRead bool inRead bool
aborted bool // set true before conn.rwc deadline is set to past 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) { ...@@ -732,11 +731,6 @@ func (cr *connReader) Read(p []byte) (n int, err error) {
cr.unlock() cr.unlock()
return 0, io.EOF return 0, io.EOF
} }
if cr.bgErr != nil {
err = cr.bgErr
cr.unlock()
return 0, err
}
if len(p) == 0 { if len(p) == 0 {
cr.unlock() cr.unlock()
return 0, nil 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