www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit ec28c5a35d6a846b54312aac16edfddd810de3b5
parent ab9330d88e29ae642bfd99c9dc1885e1643f12a6
Author: Dan Stillman <dstillman@zotero.org>
Date:   Mon,  1 Feb 2016 03:58:45 -0500

Retry S3 requests on 500 or 503 in addition to interruption

And adjust S3 success/backoff counters on success

Diffstat:
Mchrome/content/zotero/xpcom/storage/zfs.js | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/storage/zfs.js b/chrome/content/zotero/xpcom/storage/zfs.js @@ -869,7 +869,7 @@ Zotero.Sync.Storage.ZFS = (function () { return; } - if (status == 0) { + if (status == 0 || status == 500 || status == 503) { if (_s3ConsecutiveFailures >= _maxS3ConsecutiveFailures) { Zotero.debug(_s3ConsecutiveFailures + " consecutive S3 failures -- aborting", 1); @@ -921,6 +921,13 @@ Zotero.Sync.Storage.ZFS = (function () { Zotero.debug("Finished download of " + destFile.path); + // Decrease backoff delay on successful download + if (_s3Backoff > 1) { + _s3Backoff /= 2; + } + // And reset consecutive failures + _s3ConsecutiveFailures = 0; + try { deferred.resolve(Zotero.Sync.Storage.processDownload(data)); }