Browse Source

http2: fix Go 1.6 build

We still support Go 1.6 for a few more days. (it'd normally be dropped
after Go 1.9 final is out)

And maybe we'll need to make a special case for supporting it longer
than normal if gRPC needs to.

Change-Id: I78675f1ef26aa09436a70d0f8aa3a0958768dd14
Reviewed-on: https://go-review.googlesource.com/53641
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Brad Fitzpatrick 8 years ago
parent
commit
090ebbdfc2
1 changed files with 2 additions and 2 deletions
  1. 2 2
      http2/transport.go

+ 2 - 2
http2/transport.go

@@ -354,8 +354,8 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res
 				select {
 				case <-time.After(time.Second * time.Duration(backoff)):
 					continue
-				case <-req.Context().Done():
-					return nil, req.Context().Err()
+				case <-reqContext(req).Done():
+					return nil, reqContext(req).Err()
 				}
 			}
 		}