diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-11-14 19:58:58 +0100 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-11-14 19:58:58 +0100 |
commit | da4bc5afcfeb9e7fa1253720839291194578bd4a (patch) | |
tree | e6ca103b92655de06b75c28c2dbd33ae9dde9120 /lib | |
parent | 92a4267efc76b01d9161c204596c74e0d128cd28 (diff) | |
download | libquotient-da4bc5afcfeb9e7fa1253720839291194578bd4a.tar.gz libquotient-da4bc5afcfeb9e7fa1253720839291194578bd4a.zip |
ConnectionData: fix defunct jobs stalling the queue
Diffstat (limited to 'lib')
-rw-r--r-- | lib/connectiondata.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/connectiondata.cpp b/lib/connectiondata.cpp index e806f952..d57363d0 100644 --- a/lib/connectiondata.cpp +++ b/lib/connectiondata.cpp @@ -67,7 +67,8 @@ ConnectionData::ConnectionData(QUrl baseUrl) d->rateLimiter.setInterval(0); for (auto& q : d->jobs) while (!q.empty()) { - auto& job = q.front(); + const auto job = q.front(); + q.pop(); if (!job || job->error() == BaseJob::Abandoned) continue; if (job->error() != BaseJob::Pending) { @@ -79,7 +80,6 @@ ConnectionData::ConnectionData(QUrl baseUrl) } job->sendRequest(); d->rateLimiter.start(); - q.pop(); return; } qCDebug(MAIN) << d->id() << "job queues are empty"; |