Retry only twice on error in Find Available PDF

Not three times
This commit is contained in:
Dan Stillman 2022-10-29 04:39:46 -04:00
parent 06b23cca94
commit 59cb33d231

View file

@ -2032,7 +2032,7 @@ Zotero.Attachments = new function(){
addTriedURL(url); addTriedURL(url);
// Backoff loop // Backoff loop
let tries = 3; let tries = 3;
while (tries-- >= 0) { while (tries-- > 0) {
try { try {
await beforeRequest(url); await beforeRequest(url);
await this.downloadFile(url, path, options); await this.downloadFile(url, path, options);
@ -2071,7 +2071,7 @@ Zotero.Attachments = new function(){
// Backoff loop // Backoff loop
let tries = 3; let tries = 3;
while (tries-- >= 0) { while (tries-- > 0) {
try { try {
await beforeRequest(nextURL, noDelay); await beforeRequest(nextURL, noDelay);
req = await Zotero.HTTP.request( req = await Zotero.HTTP.request(