diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-02-28 17:11:10 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-02-28 17:11:10 +0900 |
commit | 9ff04e98d62f93a7a6003fc80d189e96c6835f84 (patch) | |
tree | 92e11eae3535b0efa914c43c284a5d83fc84df84 | |
parent | efd37913fdb4223168a0bb0e7897d75be4606d1f (diff) | |
download | libquotient-9ff04e98d62f93a7a6003fc80d189e96c6835f84.tar.gz libquotient-9ff04e98d62f93a7a6003fc80d189e96c6835f84.zip |
Skip retry interval if the last job attempt timed out
Closes #175.
-rw-r--r-- | jobs/basejob.cpp | 3 |
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"; |