summaryrefslogtreecommitdiff
path: root/internal/httpclient/client.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/httpclient/client.go')
-rw-r--r--internal/httpclient/client.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/httpclient/client.go b/internal/httpclient/client.go
index 8a5f51c21..10fba5d42 100644
--- a/internal/httpclient/client.go
+++ b/internal/httpclient/client.go
@@ -340,14 +340,14 @@ func (c *Client) do(r *Request) (rsp *http.Response, retry bool, err error) {
if u, _ := strconv.ParseUint(after, 10, 32); u != 0 {
// An integer no. of backoff seconds was provided.
- r.backoff = time.Duration(u) * time.Second
+ r.backoff = time.Duration(u) * time.Second // #nosec G115 -- We clamp backoff below.
} else if at, _ := http.ParseTime(after); !at.Before(now) {
// An HTTP formatted future date-time was provided.
r.backoff = at.Sub(now)
}
// Don't let their provided backoff exceed our max.
- if max := baseBackoff * time.Duration(c.retries); //
+ if max := baseBackoff * time.Duration(c.retries); // #nosec G115 -- We control c.retries.
r.backoff > max {
r.backoff = max
}