]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
repart: Flush varlink messages for progress updates
authorJulian Sparber <julian@sparber.net>
Fri, 22 May 2026 15:23:41 +0000 (17:23 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 22 May 2026 17:49:46 +0000 (18:49 +0100)
Progress updates are not send out immidialty and only once the handler
for the run method completes since the event loop is not processed while
the run handler is executed. Therefore flush varlink messages immidialty
after a progress update is queued.

Closes: github.com/systemd/systemd/issues/40238
src/repart/repart.c

index 8cfb798339538920439e2249280b7813e5756541..a9d6d8efec95cda53fbc095bc1f2cf10d55813bb 100644 (file)
@@ -2905,6 +2905,10 @@ static int context_notify(
                                 JSON_BUILD_PAIR_UNSIGNED_NOT_EQUAL("progress", percent, UINT_MAX));
                 if (r < 0)
                         log_debug_errno(r, "Failed to send varlink notify progress notification, ignoring: %m");
+
+                r = sd_varlink_flush(c->link);
+                if (r < 0)
+                        log_debug_errno(r, "Failed to flush varlink notify progress notification, ignoring: %m");
         }
 
         return 0;