mirror of
https://github.com/aws-actions/configure-aws-credentials.git
synced 2026-09-01 05:45:06 +09:00
fix: skip backoff sleep after the final retryAndBackoff attempt (#1937)
Signed-off-by: Zhiwei Liang <zhiwei.liang@zliang.me> Co-authored-by: Joseph Klix <jkl@amazon.com>
This commit is contained in:
+2
-2
@@ -260,13 +260,13 @@ export async function retryAndBackoff<T>(
|
||||
`Retrying after ${Math.floor(delay)}ms.`,
|
||||
);
|
||||
|
||||
await sleep(delay);
|
||||
|
||||
if (nextRetry >= maxRetries) {
|
||||
core.info(`Retry${opName}: reached max retries (${maxRetries}); giving up.`);
|
||||
throw err;
|
||||
}
|
||||
|
||||
await sleep(delay);
|
||||
|
||||
return await retryAndBackoff(fn, isRetryable, maxRetries, nextRetry, base, label);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user