]> granicus.if.org Git - curl/commitdiff
multi: on a request completion, check all CONNECT_PEND transfers
authorDaniel Stenberg <daniel@haxx.se>
Sat, 21 Mar 2015 21:42:43 +0000 (22:42 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 26 Mar 2015 07:14:22 +0000 (08:14 +0100)
... even if they don't have an associated connection anymore. It could
leave the waiting transfers pending with no active one on the
connection.

Bug: http://curl.haxx.se/bug/view.cgi?id=1465
Reported-by: Jiri Dvorak
lib/multi.c

index 94c216e955c7bc3778a3518d9615c66fb5e970c1..4dc7f632a6e671a9ff287412f85f79f01d4d6880 100644 (file)
@@ -1701,14 +1701,15 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
 
         data->state.pipe_broke = FALSE;
 
+        /* Check if we can move pending requests to send pipe */
+        Curl_multi_process_pending_handles(multi);
+
         if(data->easy_conn) {
           /* if this has a connection, unsubscribe from the pipelines */
           data->easy_conn->writechannel_inuse = FALSE;
           data->easy_conn->readchannel_inuse = FALSE;
           Curl_removeHandleFromPipeline(data, data->easy_conn->send_pipe);
           Curl_removeHandleFromPipeline(data, data->easy_conn->recv_pipe);
-          /* Check if we can move pending requests to send pipe */
-          Curl_multi_process_pending_handles(multi);
 
           if(disconnect_conn) {
             /* Don't attempt to send data over a connection that timed out */