]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: bgErr is unused; remove it
authorChris Manghane <cmang@golang.org>
Tue, 2 May 2017 05:34:37 +0000 (01:34 -0400)
committerChris Manghane <cmang@golang.org>
Tue, 2 May 2017 15:49:13 +0000 (15:49 +0000)
Fixes #20196.

Change-Id: Ib87f6e9e27a38f21f860b7150c818d77be653dd3
Reviewed-on: https://go-review.googlesource.com/42370
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/http/server.go

index 3cb490d8a749647418acf0fab8a4c790bdc79201..838b95aaeda65436c127da45585e3f2a05696fb9 100644 (file)
@@ -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