summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-02-14 16:54:06 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-02-14 16:57:10 +0100
commitee650c76be0451e83b17bdb59f42c01fde9fed28 (patch)
treed085a1bdad915242c775063a7dbe4e8afebc690a
parentaf9afd8b17dc6acecf76d6a95e8971b7788f7bba (diff)
downloadcurl-bagder/h2-starvation.tar.gz
multi: if Curl_readwrite sets 'comeback' use expire, not loopbagder/h2-starvation
Otherwise, a very fast single transfer ricks starving out other concurrent transfers.
-rw-r--r--lib/multi.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/multi.c b/lib/multi.c
index 37a37a4f0..7e8a15038 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -2191,8 +2191,12 @@ 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 the expense of other concurrent transfers */
+ Curl_expire(data, 0, EXPIRE_RUN_NOW);
+ rc = CURLM_OK;
+ }
break;
}