summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-04-30 11:16:53 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-05-01 22:51:23 +0200
commit41fcdf71a1cb530879b19cb097768d04c5e74af4 (patch)
treed9528e172383b5e8050e08d88ea7b4109928b530
parentbe6e281cf2792b06b6d413d120b4a9381e4b0653 (diff)
downloadcurl-41fcdf71a1cb530879b19cb097768d04c5e74af4.tar.gz
ConnectionExists: improve non-multiplexing use case
- better log output - make sure multiplex is enabled for it to be used
-rw-r--r--lib/url.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/url.c b/lib/url.c
index ad8aa6996..5b3ce11f2 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1031,7 +1031,7 @@ ConnectionExists(struct Curl_easy *data,
/* We can't multiplex if we don't know anything about the server */
if(canmultiplex) {
- if(bundle->multiuse <= BUNDLE_UNKNOWN) {
+ if(bundle->multiuse == BUNDLE_UNKNOWN) {
if((bundle->multiuse == BUNDLE_UNKNOWN) && data->set.pipewait) {
infof(data, "Server doesn't support multiplex yet, wait\n");
*waitpipe = TRUE;
@@ -1047,6 +1047,10 @@ ConnectionExists(struct Curl_easy *data,
infof(data, "Could multiplex, but not asked to!\n");
canmultiplex = FALSE;
}
+ if(bundle->multiuse == BUNDLE_NO_MULTIUSE) {
+ infof(data, "Can not multiplex, even if we wanted to!\n");
+ canmultiplex = FALSE;
+ }
}
curr = bundle->conn_list.head;
@@ -1071,7 +1075,8 @@ ConnectionExists(struct Curl_easy *data,
continue;
}
- multiplexed = CONN_INUSE(check);
+ multiplexed = CONN_INUSE(check) &&
+ (bundle->multiuse == BUNDLE_MULTIPLEX);
if(canmultiplex) {
if(check->bits.protoconnstart && check->bits.close)