]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
speedcheck: do not trigger low speed cancel on transfers with CURL_READFUNC_PAUSE
authorbttrfl on github <33011292+bttrfl@users.noreply.github.com>
Sun, 23 Nov 2025 03:55:16 +0000 (06:55 +0300)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 24 Nov 2025 10:40:30 +0000 (11:40 +0100)
When a trasfer is paused from a read callback with a CURL_READFUNC_PAUSE
code, it should be excluded from the speedcheck. Currently only
transfers paused from write callbacks are excluded, because the code
only checks for "recv direction" of the transfer. This commit adds a
check for "send direction".

Issue similar to https://github.com/curl/curl/issues/6358

Closes #19653

lib/speedcheck.c

index aede060019200af8122f098a5db9f13e279f982a..b074199c37d6bb436d17bc9722ae25454d6adeab 100644 (file)
@@ -42,7 +42,7 @@ void Curl_speedinit(struct Curl_easy *data)
 CURLcode Curl_speedcheck(struct Curl_easy *data,
                          struct curltime now)
 {
-  if(Curl_xfer_recv_is_paused(data))
+  if(Curl_xfer_recv_is_paused(data) || Curl_xfer_send_is_paused(data))
     /* A paused transfer is not qualified for speed checks */
     return CURLE_OK;