From: Olivier Goffart Date: Mon, 5 Dec 2016 16:21:36 +0000 (+0100) Subject: libsync: Clear the upload info after several retries (#5345) X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~978 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4ac2b764a4640732302945e6f5da510d62e40742;p=nextcloud-desktop.git libsync: Clear the upload info after several retries (#5345) Issue #5344 --- diff --git a/src/libsync/owncloudpropagator.cpp b/src/libsync/owncloudpropagator.cpp index 38011862d..e2ce6c5dd 100644 --- a/src/libsync/owncloudpropagator.cpp +++ b/src/libsync/owncloudpropagator.cpp @@ -108,6 +108,11 @@ static bool blacklistCheck(SyncJournalDb* journal, const SyncFileItem& item) if (newEntry.isValid()) { journal->updateErrorBlacklistEntry(newEntry); + // Also clear upload info if any so we don't resume from the same transfer-id if there was too many failures (#5344) + // (maybe the reason is that the state for this transfer id is broken on the server.) + if (newEntry._retryCount > 3) { + journal->setUploadInfo(item._file, SyncJournalDb::UploadInfo()); + } } else if (oldEntry.isValid()) { journal->wipeErrorBlacklistEntry(item._file); }