1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
https://github.com/curl/curl/pull/19383
From a5038ff41f83907c896a41716f4f78a80a144cd1 Mon Sep 17 00:00:00 2001
From: Stefan Eissing <stefan@eissing.org>
Date: Thu, 6 Nov 2025 12:47:33 +0100
Subject: [PATCH] curl: fix progress meter in parallel mode
With `check_finished()` triggered by notifications now, the
`progress_meter()` was no longer called at regular intervals.
Move `progress_meter()` out of `check_finishe()` into the perform
loop and event callbacks.
---
src/tool_operate.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 74f5da5fa915..e1f61a2ba519 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -1549,6 +1549,7 @@ static void on_uv_socket(uv_poll_t *req, int status, int events)
curl_multi_socket_action(c->uv->s->multi, c->sockfd, flags,
&c->uv->s->still_running);
+ progress_meter(c->uv->s->multi, &c->uv->s->start, FALSE);
}
/* callback from libuv when timeout expires */
@@ -1561,6 +1562,7 @@ static void on_uv_timeout(uv_timer_t *req)
if(uv && uv->s) {
curl_multi_socket_action(uv->s->multi, CURL_SOCKET_TIMEOUT, 0,
&uv->s->still_running);
+ progress_meter(uv->s->multi, &uv->s->start, FALSE);
}
}
@@ -1733,7 +1735,6 @@ static CURLcode check_finished(struct parastate *s)
int rc;
CURLMsg *msg;
bool checkmore = FALSE;
- progress_meter(s->multi, &s->start, FALSE);
do {
msg = curl_multi_info_read(s->multi, &rc);
if(msg) {
@@ -1875,6 +1876,8 @@ static CURLcode parallel_transfers(CURLSH *share)
s->mcode = curl_multi_poll(s->multi, NULL, 0, 1000, NULL);
if(!s->mcode)
s->mcode = curl_multi_perform(s->multi, &s->still_running);
+
+ progress_meter(s->multi, &s->start, FALSE);
}
(void)progress_meter(s->multi, &s->start, TRUE);
|