speedcheck: do not trigger low speed cancel on transfers with CURL_READFUNC_PAUSE

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
This commit is contained in:
bttrfl on github 2025-11-23 06:55:16 +03:00 committed by Daniel Stenberg
parent 4d04a03016
commit b5265b24b0
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View 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;