From 59cb33d2319e1c1dc85777b2316f313a4fac90b7 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 29 Oct 2022 04:39:46 -0400 Subject: [PATCH] Retry only twice on error in Find Available PDF Not three times --- chrome/content/zotero/xpcom/attachments.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/attachments.js b/chrome/content/zotero/xpcom/attachments.js index 6805293367..632b4460ca 100644 --- a/chrome/content/zotero/xpcom/attachments.js +++ b/chrome/content/zotero/xpcom/attachments.js @@ -2032,7 +2032,7 @@ Zotero.Attachments = new function(){ addTriedURL(url); // Backoff loop let tries = 3; - while (tries-- >= 0) { + while (tries-- > 0) { try { await beforeRequest(url); await this.downloadFile(url, path, options); @@ -2071,7 +2071,7 @@ Zotero.Attachments = new function(){ // Backoff loop let tries = 3; - while (tries-- >= 0) { + while (tries-- > 0) { try { await beforeRequest(nextURL, noDelay); req = await Zotero.HTTP.request(