]> granicus.if.org Git - curl/commitdiff
http2: leave WAITPERFORM when conn is multiplexed
authorDaniel Stenberg <daniel@haxx.se>
Thu, 30 Apr 2015 13:25:06 +0000 (15:25 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 18 May 2015 06:57:18 +0000 (08:57 +0200)
No need to wait for our "spot" like for pipelining

lib/http2.c
lib/multi.c
lib/urldata.h

index 42f31290f2b30a30d360f123273d9d9c7d593fd6..b8329d880cf78b4a6fd5d8699c80dff518983b30 100644 (file)
@@ -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;
 
index a095238d59b9f6742fd92ec28911ddeb49d07d41..5595bbd1f82d3b9755a758278096938eaea723a1 100644 (file)
@@ -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);
index 25fb98fe5f6d7a452fe5a9d1e0164f2d91e534a7..b09177e7ab1d4303498c1895203ae48946b6e8dc 100644 (file)
@@ -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 {