From 29ba6422a0321ed9ccef7abe3a0a47a688b936f4 Mon Sep 17 00:00:00 2001 From: Aleix Pol i Gonzalez Date: Fri, 3 Mar 2023 16:36:51 +0100 Subject: [PATCH] pk: Don't forget to finish streams The stream would remain open ad eternum, hoping for a finish() call that would never come. BUG: 466765 (cherry picked from commit a5fb09b82833437ef3aed72b4d987c9906f3ec27) --- libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp b/libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp index 2abf7441d..0a12b376b 100644 --- a/libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp +++ b/libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp @@ -520,8 +520,10 @@ public: void sendResources(const QVector &res, bool waitForResolved = false) { - if (res.isEmpty()) + if (res.isEmpty()) { + finish(); return; + } Q_ASSERT(res.size() == QSet(res.constBegin(), res.constEnd()).size()); const auto toResolve = kFilter>(res, needsResolveFilter); -- 2.39.2