diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-04-30 11:16:53 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-04-30 11:16:53 +0200 |
commit | 885b094ac11018b6b79a0706687784c02249fa9a (patch) | |
tree | 1e0540aed244504bc8506b3338cb9deb1290d3b1 | |
parent | 05c62c3ce51c0d6abdac0a47577546149f692b4f (diff) | |
download | curl-bagder/improved-no-multiplexing.tar.gz |
ConnectionExists: improve non-multiplexing use casebagder/improved-no-multiplexing
- better log output
- make sure multiplex is enabled for it to be used
-rw-r--r-- | lib/url.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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) |