lfsapi: teach 'newRequestForRetry' to copy request context

This commit is contained in:
Taylor Blau 2017-08-24 17:22:22 -04:00
parent 4fc2dc5bd6
commit 9b9fccacb7

@ -304,6 +304,10 @@ func newRequestForRetry(req *http.Request, location string) (*http.Request, erro
// lfsapi.Client.traceRequest().
newReq.Body = req.Body
newReq.ContentLength = req.ContentLength
// Copy the request's context.Context, if any.
newReq = newReq.WithContext(req.Context())
return newReq, nil
}