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 22:30:19 +0100 |
commit | 693241d572e3e7e6b23435104a1b98c9afbec5c9 (patch) | |
tree | 8bf45bccacf4ddc7aa4f9fc2d7fa2c0571777a92 | |
parent | 2162cc8c6b026bbdf077f0b51a89a38e20963cd6 (diff) | |
download | libquotient-693241d572e3e7e6b23435104a1b98c9afbec5c9.tar.gz libquotient-693241d572e3e7e6b23435104a1b98c9afbec5c9.zip |
ConnectionData: fix defunct jobs stalling the queue
-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"; |