From 160b11bdfe32c9983fe5f34eafa783148b2decbe Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Tue, 7 Apr 2020 16:14:21 +0200 Subject: BaseJob: don't finish and re-try at the same time Due to a missing return statement, a retry with auth case led to the job being finished and pending at the same time, with no good consequences. --- lib/jobs/basejob.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/jobs') diff --git a/lib/jobs/basejob.cpp b/lib/jobs/basejob.cpp index dfc3d3dd..7cddc343 100644 --- a/lib/jobs/basejob.cpp +++ b/lib/jobs/basejob.cpp @@ -527,6 +527,7 @@ void BaseJob::finishJob() qCWarning(d->logCat) << this << "re-running with authentication"; emit retryScheduled(d->retriesTaken, 0); d->connection->submit(this); + return; } if ((error() == NetworkError || error() == Timeout) && d->retriesTaken < d->maxRetries) { @@ -542,6 +543,8 @@ void BaseJob::finishJob() return; } + Q_ASSERT(status().code != Pending); + // Notify those interested in any completion of the job including abandon() emit finished(this); -- cgit v1.2.3