pkg/plugins: rename max/min as it collides with go1.21 builtin
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit df2f25a977
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
710c748801
commit
0b97ecddb0
1 changed files with 4 additions and 4 deletions
|
@ -227,13 +227,13 @@ func (c *Client) callWithRetry(serviceMethod string, data io.Reader, retry bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
func backoff(retries int) time.Duration {
|
func backoff(retries int) time.Duration {
|
||||||
b, max := 1, defaultTimeOut
|
b, maxTimeout := 1, defaultTimeOut
|
||||||
for b < max && retries > 0 {
|
for b < maxTimeout && retries > 0 {
|
||||||
b *= 2
|
b *= 2
|
||||||
retries--
|
retries--
|
||||||
}
|
}
|
||||||
if b > max {
|
if b > maxTimeout {
|
||||||
b = max
|
b = maxTimeout
|
||||||
}
|
}
|
||||||
return time.Duration(b) * time.Second
|
return time.Duration(b) * time.Second
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue