summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-12-05 08:39:31 +0100
committerDaniel Stenberg <daniel@haxx.se>2017-12-05 08:39:31 +0100
commit51eaf956396d594f3e1e1b2040f06995d765fc96 (patch)
treef4606a2221f2662bf2dee467dfe7fafd961f973e /lib
parent4401409468f590520dd5d0f0a55607eefa5ff4c1 (diff)
downloadcurl-bagder/conncache-reuse-multiplex.tar.gz
conncache: only allow multiplexing within same multi handlebagder/conncache-reuse-multiplex
Connections that are used for HTTP/1.1 Pipelining or HTTP/2 multiplexing only get additional transfers added to them if the existing connection is held by the same multi or easy handle. libcurl does not support doing HTTP/2 streams in different threads using a shared connection.
Diffstat (limited to 'lib')
-rw-r--r--lib/url.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/url.c b/lib/url.c
index 731e67e17..fc59a209f 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1293,6 +1293,11 @@ ConnectionExists(struct Curl_easy *data,
already in use so we skip it */
continue;
+ if((check->inuse) && (check->data->multi != needle->data->multi))
+ /* this could be subject for pipeline/multiplex use, but only
+ if they belong to the same multi handle */
+ continue;
+
if(needle->localdev || needle->localport) {
/* If we are bound to a specific local end (IP+port), we must not
re-use a random other one, although if we didn't ask for a