From: Daniel Stenberg Date: Mon, 11 Jan 2021 09:01:49 +0000 (+0100) Subject: multi: skip DONE state if there's no connection left for ftp wildcard X-Git-Tag: curl-7_75_0~122 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48220f7e3d4431879602f8d3bf231bf6f635ca79;p=thirdparty%2Fcurl.git multi: skip DONE state if there's no connection left for ftp wildcard ... to avoid running in that state with data->conn being NULL. --- diff --git a/lib/multi.c b/lib/multi.c index d3863c1e95..a40db6bd8f 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -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; }