]> granicus.if.org Git - curl/commitdiff
After the TCP connect is confirmed in CURLM_STATE_WAITCONNECT and it changes
authorDaniel Stenberg <daniel@haxx.se>
Mon, 11 Jan 2010 23:05:35 +0000 (23:05 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 11 Jan 2010 23:05:35 +0000 (23:05 +0000)
state, we return CURLM_CALL_MULTI_PERFORM unconditionally then so that we
can act faster like in the case the protocol-specific connect doesn't block
on anything and we can just persue on the next action immediately. It also
then avoids a case where curl_multi_fdset() would return -1.

lib/multi.c

index d7381e7faa17896457b43b84e3a03b131c5bd512..5ccadc2a861b0ed84305d70bacfcc1775852d20b 100644 (file)
@@ -1099,14 +1099,14 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
           else
 #endif
             multistate(easy, CURLM_STATE_PROTOCONNECT);
+
         }
-        else {
+        else
           /* after the connect has completed, go WAITDO or DO */
           multistate(easy, multi->pipelining_enabled?
                      CURLM_STATE_WAITDO:CURLM_STATE_DO);
 
-          result = CURLM_CALL_MULTI_PERFORM;
-        }
+        result = CURLM_CALL_MULTI_PERFORM;
       }
       break;