aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-02-28 17:11:10 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-02-28 17:11:10 +0900
commit9ff04e98d62f93a7a6003fc80d189e96c6835f84 (patch)
tree92e11eae3535b0efa914c43c284a5d83fc84df84
parentefd37913fdb4223168a0bb0e7897d75be4606d1f (diff)
downloadlibquotient-9ff04e98d62f93a7a6003fc80d189e96c6835f84.tar.gz
libquotient-9ff04e98d62f93a7a6003fc80d189e96c6835f84.zip
Skip retry interval if the last job attempt timed out
Closes #175.
-rw-r--r--jobs/basejob.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/jobs/basejob.cpp b/jobs/basejob.cpp
index c3b110f0..7669d1d4 100644
--- a/jobs/basejob.cpp
+++ b/jobs/basejob.cpp
@@ -373,7 +373,8 @@ void BaseJob::finishJob()
// TODO: The whole retrying thing should be put to ConnectionManager
// otherwise independently retrying jobs make a bit of notification
// storm towards the UI.
- const auto retryInterval = getNextRetryInterval();
+ const auto retryInterval =
+ error() == TimeoutError ? 0 : getNextRetryInterval();
++d->retriesTaken;
qCWarning(d->logCat) << this << "will take retry" << d->retriesTaken
<< "in" << retryInterval/1000 << "s";