]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
multi: if Curl_readwrite sets 'comeback' use expire, not loop
authorDaniel Stenberg <daniel@haxx.se>
Fri, 14 Feb 2020 15:54:06 +0000 (16:54 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 16 Feb 2020 21:52:41 +0000 (22:52 +0100)
Otherwise, a very fast single transfer ricks starving out other
concurrent transfers.

Closes #4927

lib/multi.c

index 37a37a4f0c8d8aae4eaf0143cc7bddf4af3451f9..51154d6b22d2f7e943dfd81d318f8b8db3fd746d 100644 (file)
@@ -2191,8 +2191,13 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
           }
         }
       }
-      else if(comeback)
-        rc = CURLM_CALL_MULTI_PERFORM;
+      else if(comeback) {
+        /* This avoids CURLM_CALL_MULTI_PERFORM so that a very fast transfer
+           won't get stuck on this transfer at the expense of other concurrent
+           transfers */
+        Curl_expire(data, 0, EXPIRE_RUN_NOW);
+        rc = CURLM_OK;
+      }
       break;
     }