mirror of
https://github.com/aws-actions/configure-aws-credentials.git
synced 2026-09-02 05:55:10 +09:00
fix: maxRetry hit infinite loop with negative input
This commit is contained in:
+1
-1
@@ -124,7 +124,7 @@ export async function retryAndBackoff<T>(
|
||||
// It's retryable, so sleep and retry.
|
||||
await sleep(Math.random() * (Math.pow(2, retries) * base));
|
||||
retries += 1;
|
||||
if (retries === maxRetries) {
|
||||
if (retries >= maxRetries) {
|
||||
throw err;
|
||||
}
|
||||
return await retryAndBackoff(fn, isRetryable, maxRetries, retries, base);
|
||||
|
||||
Reference in New Issue
Block a user