From: Zbigniew Jędrzejewski-Szmek Date: Wed, 11 Feb 2026 11:44:13 +0000 (+0100) Subject: report: fix hang when we start skipping metrics X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f78e5fa86584d94c871f8a24ada387cbbb51200;p=thirdparty%2Fsystemd.git report: fix hang when we start skipping metrics Fixup for 0ec663a41fc49a3e4ec592c4e0037f4bc7e8f6fc. --- diff --git a/src/report/report.c b/src/report/report.c index 62affd0a7cb..fad7fdf363d 100644 --- a/src/report/report.c +++ b/src/report/report.c @@ -85,12 +85,9 @@ static int metrics_on_query_reply( log_info("Varlink timed out"); else log_error("Varlink error: %s", error_id); - } else { - if (context->n_metrics >= METRICS_MAX) { - context->n_skipped_metrics++; - return 0; - } - + } else if (context->n_metrics >= METRICS_MAX) + context->n_skipped_metrics++; + else { /* Collect metrics for later sorting */ if (!GREEDY_REALLOC(context->metrics, context->n_metrics + 1)) return log_oom();