mirror of
https://github.com/certd/certd.git
synced 2026-04-24 12:27:25 +08:00
chore: 1
This commit is contained in:
@@ -57,7 +57,12 @@ async function retryPromise(fn, attempts, backoff, logger = log) {
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
if (aborted || ((backoff.attempts + 1) >= attempts)) {
|
if (aborted){
|
||||||
|
logger(`用户取消重试`);
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
if ( ((backoff.attempts + 1) >= attempts)) {
|
||||||
|
logger(`重试次数超过${attempts}次`);
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user