diff --git a/pkg/http/client.go b/pkg/http/client.go index 4c6b576..e90513f 100644 --- a/pkg/http/client.go +++ b/pkg/http/client.go @@ -194,19 +194,7 @@ func (r *HTTPClient) Do(req *http.Request) (*http.Response, error) { for { r.replaceHostIfNeeded(req) - ctx, cancel := context.WithTimeout(req.Context(), time.Duration(r.timeoutSecs)*time.Second) - defer cancel() - req = req.WithContext(ctx) - resp, err = r.client.Do(req) - select { - case <-ctx.Done(): - if ctx.Err() == context.DeadlineExceeded { - err = fmt.Errorf("request timed out after %d seconds", r.timeoutSecs) - } - default: - } - if resp != nil && (resp.StatusCode < http.StatusOK || resp.StatusCode > http.StatusPartialContent) { body, _ := io.ReadAll(resp.Body) if body != nil {