mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
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.
This commit is contained in:
parent
cad44602e1
commit
ed48ed0122
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user