]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
multi: do no expire a blocked transfer
authorStefan Eissing <stefan@eissing.org>
Mon, 16 Jun 2025 11:40:15 +0000 (13:40 +0200)
committerViktor Szakats <commit@vsz.me>
Tue, 17 Jun 2025 10:07:01 +0000 (12:07 +0200)
When checking to expire a transfer with input data pending, also assess
the blocked status and do not EXPIRE_RUN_NOW a transfer that is blocked
on READ/WRITE.

Follow-up to 62349e45a818e50b5cdcd017c149f9dc87fce9fe #17636

Closes #17639

lib/multi.c

index ef41650b329d4198a67521c338cf366536f3ad4c..79a0935c1060802958d85d629e46dcf7d786e81a 100644 (file)
@@ -1039,12 +1039,13 @@ void Curl_multi_getsock(struct Curl_easy *data,
   }
 
 
-  /* Waiting to receive with buffered input.
+  /* Unblocked and waiting to receive with buffered input.
    * Make transfer run again at next opportunity. */
-  if((Curl_pollset_want_read(data, ps, data->conn->sock[FIRSTSOCKET]) &&
-      Curl_conn_data_pending(data, FIRSTSOCKET)) ||
-     (Curl_pollset_want_read(data, ps, data->conn->sock[SECONDARYSOCKET]) &&
-      Curl_conn_data_pending(data, SECONDARYSOCKET))) {
+  if(!Curl_xfer_is_blocked(data) &&
+     ((Curl_pollset_want_read(data, ps, data->conn->sock[FIRSTSOCKET]) &&
+       Curl_conn_data_pending(data, FIRSTSOCKET)) ||
+      (Curl_pollset_want_read(data, ps, data->conn->sock[SECONDARYSOCKET]) &&
+       Curl_conn_data_pending(data, SECONDARYSOCKET)))) {
     CURL_TRC_M(data, "%s pollset[] has POLLIN, but there is still "
                "buffered input to consume -> EXPIRE_RUN_NOW", caller);
     Curl_expire(data, 0, EXPIRE_RUN_NOW);