aboutsummaryrefslogtreecommitdiff
path: root/lib/jobs
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2020-03-30 19:12:06 +0200
committerKitsune Ral <Kitsune-Ral@users.sf.net>2020-03-30 19:45:00 +0200
commitecc31fc7a615faa516a03c07ebd96d0d2494c315 (patch)
treeef5578607bb4b7e47cce4fde75813cfa0034608e /lib/jobs
parentc2493836c3b0f706e03ce71769761890d1314d7e (diff)
downloadlibquotient-ecc31fc7a615faa516a03c07ebd96d0d2494c315.tar.gz
libquotient-ecc31fc7a615faa516a03c07ebd96d0d2494c315.zip
BaseJob: shutdown timers on abandoning and destruction
A part of the fix for #398.
Diffstat (limited to 'lib/jobs')
-rw-r--r--lib/jobs/basejob.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/jobs/basejob.cpp b/lib/jobs/basejob.cpp
index 68adeaf6..8b63f7e8 100644
--- a/lib/jobs/basejob.cpp
+++ b/lib/jobs/basejob.cpp
@@ -145,6 +145,7 @@ BaseJob::BaseJob(HttpVerb verb, const QString& name, const QString& endpoint,
BaseJob::~BaseJob()
{
stop();
+ d->retryTimer.stop(); // See #398
qCDebug(d->logCat) << this << "destroyed";
}
@@ -686,6 +687,8 @@ void BaseJob::setStatus(int code, QString message)
void BaseJob::abandon()
{
beforeAbandon(d->reply ? d->reply.data() : nullptr);
+ d->timer.stop();
+ d->retryTimer.stop(); // In case abandon() was called between retries
setStatus(Abandoned);
if (d->reply)
d->reply->disconnect(this);