diff options
author | Daniel Stenberg <daniel@haxx.se> | 2015-04-30 15:25:06 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2015-05-18 08:57:18 +0200 |
commit | f4b8b39881e2d3304abbfb051a8c31f55ba7f550 (patch) | |
tree | 071ecdc46ba8a070942807b60e6f2d5634b52c66 | |
parent | 01e1bdb10ce613d4a94fc618819156fc61d2f419 (diff) |
http2: leave WAITPERFORM when conn is multiplexed
No need to wait for our "spot" like for pipelining
-rw-r--r-- | lib/http2.c | 1 | ||||
-rw-r--r-- | lib/multi.c | 7 | ||||
-rw-r--r-- | lib/urldata.h | 1 |
3 files changed, 6 insertions, 3 deletions
diff --git a/lib/http2.c b/lib/http2.c index 42f31290f..b8329d880 100644 --- a/lib/http2.c +++ b/lib/http2.c @@ -1120,6 +1120,7 @@ CURLcode Curl_http2_setup(struct connectdata *conn) httpc->upload_mem = NULL; httpc->upload_len = 0; + conn->bits.multiplex = TRUE; /* at least potentially multiplexed */ conn->httpversion = 20; conn->bundle->server_supports_pipelining = TRUE; diff --git a/lib/multi.c b/lib/multi.c index a095238d5..5595bbd1f 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -1429,9 +1429,10 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, case CURLM_STATE_WAITPERFORM: /* Wait for our turn to PERFORM */ - if(!data->easy_conn->readchannel_inuse && - isHandleAtHead(data, - data->easy_conn->recv_pipe)) { + if((!data->easy_conn->readchannel_inuse && + isHandleAtHead(data, + data->easy_conn->recv_pipe)) || + data->easy_conn->bits.multiplex) { /* Grab the channel */ data->easy_conn->readchannel_inuse = TRUE; multistate(data, CURLM_STATE_PERFORM); diff --git a/lib/urldata.h b/lib/urldata.h index 25fb98fe5..b09177e7a 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -530,6 +530,7 @@ struct ConnectBits { bool bound; /* set true if bind() has already been done on this socket/ connection */ bool type_set; /* type= was used in the URL */ + bool multiplex; /* connection is multiplexed */ }; struct hostname { |