From 693241d572e3e7e6b23435104a1b98c9afbec5c9 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sat, 14 Nov 2020 19:58:58 +0100 Subject: ConnectionData: fix defunct jobs stalling the queue --- lib/connectiondata.cpp | 4 ++-- 1 file 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"; -- cgit v1.2.3