From 5f8ab2bf6815bb5bdc2605ddc402996210febd6b Mon Sep 17 00:00:00 2001 From: Mike Danese Date: Mon, 27 Jan 2020 19:52:47 -0800 Subject: [PATCH] various context related cleanups to rest.Request * Move all usage of r.ctx to the beginning of Do, DoRaw, Stream, Watch * Move tryThrottle from Do and DoRaw into request() * Make request() and tryThrottle take a context * In request(), remove the timeout context setting out of the loop These changes should be entirely behavior preserving. Kubernetes-commit: ed48ed0122c7289f458a6bc3ac616319d5c17e91 --- rest/request.go | 1 + 1 file changed, 1 insertion(+) diff --git a/rest/request.go b/rest/request.go index 948d3d9c..ebc811e4 100644 --- a/rest/request.go +++ b/rest/request.go @@ -786,6 +786,7 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp maxRetries := 10 retries := 0 for { + url := r.URL().String() req, err := http.NewRequest(r.verb, url, r.body) if err != nil {