]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
multi: do CURLM_CALL_MULTI_PERFORM at two more places
authorDaniel Stenberg <daniel@haxx.se>
Sat, 7 Oct 2023 18:10:36 +0000 (20:10 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 7 Oct 2023 20:54:54 +0000 (22:54 +0200)
... when it does a state transition but there is no particular socket or
timer activity. This was made apparent when commit b5bb84c removed a
superfluous timer expiry.

Reported-by: Dan Fandrich.
Fixes #12033
Closes #12056

lib/multi.c

index cefe11a530f95310a26321bf7d5653852776fed7..ff753ac8ce3a048f09cc7e9b465273e091383307 100644 (file)
@@ -2125,9 +2125,11 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
       }
       if(!result)
         result = protocol_connect(data, &protocol_connected);
-      if(!result && !protocol_connected)
+      if(!result && !protocol_connected) {
         /* switch to waiting state */
         multistate(data, MSTATE_PROTOCONNECTING);
+        rc = CURLM_CALL_MULTI_PERFORM;
+      }
       else if(!result) {
         /* protocol connect has completed, go WAITDO or DO */
         multistate(data, MSTATE_DO);
@@ -2214,6 +2216,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
             /* DO was not completed in one function call, we must continue
                DOING... */
             multistate(data, MSTATE_DOING);
+            rc = CURLM_CALL_MULTI_PERFORM;
           }
 
           /* after DO, go DO_DONE... or DO_MORE */