Skip to content

Commit

Permalink
http2: leave WAITPERFORM when conn is multiplexed
Browse files Browse the repository at this point in the history
No need to wait for our "spot" like for pipelining
  • Loading branch information
bagder committed May 18, 2015
1 parent 01e1bdb commit f4b8b39
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/http2.c
Expand Up @@ -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;

Expand Down
7 changes: 4 additions & 3 deletions lib/multi.c
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions lib/urldata.h
Expand Up @@ -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 {
Expand Down

0 comments on commit f4b8b39

Please sign in to comment.