This commit is contained in:
xiaojunnuo
2026-02-06 16:36:57 +08:00
parent 8d61e8179f
commit 9f55c3605a
+6 -1
View File
@@ -57,7 +57,12 @@ async function retryPromise(fn, attempts, backoff, logger = log) {
return data;
}
catch (e) {
if (aborted || ((backoff.attempts + 1) >= attempts)) {
if (aborted){
logger(`用户取消重试`);
throw e;
}
if ( ((backoff.attempts + 1) >= attempts)) {
logger(`重试次数超过${attempts}`);
throw e;
}