Add protection against immediate retries in delayGenerator
This commit is contained in:
parent
6a1f0251cd
commit
c7da16f07d
1 changed files with 7 additions and 0 deletions
|
@ -887,7 +887,14 @@ Zotero.Utilities.Internal = {
|
|||
delay = interval;
|
||||
}
|
||||
|
||||
// Be safe
|
||||
if (!delay) {
|
||||
Zotero.logError(`Incorrect delay ${delay} -- stopping`);
|
||||
yield Zotero.Promise.resolve(false);
|
||||
}
|
||||
|
||||
if (maxTime && (totalTime + delay) > maxTime) {
|
||||
Zotero.debug(`Total delay time exceeds ${maxTime} -- stopping`);
|
||||
yield Zotero.Promise.resolve(false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue