]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
multi: skip DONE state if there's no connection left for ftp wildcard
authorDaniel Stenberg <daniel@haxx.se>
Mon, 11 Jan 2021 09:01:49 +0000 (10:01 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 11 Jan 2021 11:33:11 +0000 (12:33 +0100)
... to avoid running in that state with data->conn being NULL.

lib/multi.c

index d3863c1e958e2242525352fdd008a896e6860ac0..a40db6bd8f699658bf4115a57ca253b6edfaa7c3 100644 (file)
@@ -1916,7 +1916,10 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
               if(wc->state == CURLWC_DONE || wc->state == CURLWC_SKIP) {
                 /* skip some states if it is important */
                 multi_done(data, CURLE_OK, FALSE);
-                multistate(data, CURLM_STATE_DONE);
+
+                /* if there's no connection left, skip the DONE state */
+                multistate(data, data->conn ?
+                           CURLM_STATE_DONE : CURLM_STATE_COMPLETED);
                 rc = CURLM_CALL_MULTI_PERFORM;
                 break;
               }