From 215baa74f709cd5026ea037eb9204cee93baa1bb Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 17 Oct 2019 10:05:53 +0200 Subject: curl: add --parallel-immediate Starting with this change when doing parallel transfers, without this option set, curl will prefer to create new transfers multiplexed on an existing connection rather than creating a brand new one. --parallel-immediate can be set to tell curl to prefer to use new connections rather than to wait and try to multiplex. libcurl-wise, this means that curl will set CURLOPT_PIPEWAIT by default on parallel transfers. Suggested-by: Tom van der Woerdt Closes #4500 --- src/tool_operate.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/tool_operate.c') diff --git a/src/tool_operate.c b/src/tool_operate.c index 4ecb1ed5f..0de81cd49 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -1976,6 +1976,10 @@ static CURLcode add_parallel_transfers(struct GlobalConfig *global, if(result) break; + /* parallel connect means that we don't set PIPEWAIT since pipewait + will make libcurl prefer multiplexing */ + (void)curl_easy_setopt(per->curl, CURLOPT_PIPEWAIT, + global->parallel_connect ? 0L : 1L); (void)curl_easy_setopt(per->curl, CURLOPT_PRIVATE, per); (void)curl_easy_setopt(per->curl, CURLOPT_XFERINFOFUNCTION, xferinfo_cb); (void)curl_easy_setopt(per->curl, CURLOPT_XFERINFODATA, per); -- cgit v1.2.3