mirror of
https://github.com/curl/curl.git
synced 2025-02-23 15:10:03 +08:00
ConnectionExists: improve non-multiplexing use case
- better log output - make sure multiplex is enabled for it to be used
This commit is contained in:
parent
be6e281cf2
commit
41fcdf71a1
@ -1031,7 +1031,7 @@ ConnectionExists(struct Curl_easy *data,
|
|||||||
|
|
||||||
/* We can't multiplex if we don't know anything about the server */
|
/* We can't multiplex if we don't know anything about the server */
|
||||||
if(canmultiplex) {
|
if(canmultiplex) {
|
||||||
if(bundle->multiuse <= BUNDLE_UNKNOWN) {
|
if(bundle->multiuse == BUNDLE_UNKNOWN) {
|
||||||
if((bundle->multiuse == BUNDLE_UNKNOWN) && data->set.pipewait) {
|
if((bundle->multiuse == BUNDLE_UNKNOWN) && data->set.pipewait) {
|
||||||
infof(data, "Server doesn't support multiplex yet, wait\n");
|
infof(data, "Server doesn't support multiplex yet, wait\n");
|
||||||
*waitpipe = TRUE;
|
*waitpipe = TRUE;
|
||||||
@ -1047,6 +1047,10 @@ ConnectionExists(struct Curl_easy *data,
|
|||||||
infof(data, "Could multiplex, but not asked to!\n");
|
infof(data, "Could multiplex, but not asked to!\n");
|
||||||
canmultiplex = FALSE;
|
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;
|
curr = bundle->conn_list.head;
|
||||||
@ -1071,7 +1075,8 @@ ConnectionExists(struct Curl_easy *data,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
multiplexed = CONN_INUSE(check);
|
multiplexed = CONN_INUSE(check) &&
|
||||||
|
(bundle->multiuse == BUNDLE_MULTIPLEX);
|
||||||
|
|
||||||
if(canmultiplex) {
|
if(canmultiplex) {
|
||||||
if(check->bits.protoconnstart && check->bits.close)
|
if(check->bits.protoconnstart && check->bits.close)
|
||||||
|
Loading…
Reference in New Issue
Block a user