From: Michael Kaufmann Date: Thu, 25 Oct 2018 11:07:03 +0000 (+0200) Subject: multi: Fix error handling in the SENDPROTOCONNECT state X-Git-Tag: curl-7_62_0~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3793761a3777095d643e9f2da951615e1178782c;p=thirdparty%2Fcurl.git multi: Fix error handling in the SENDPROTOCONNECT state If Curl_protocol_connect() returns an error code, handle the error instead of switching to the next state. Closes #3170 --- diff --git a/lib/multi.c b/lib/multi.c index 7c691a1b84..0db2a97308 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -1608,7 +1608,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, case CURLM_STATE_SENDPROTOCONNECT: result = Curl_protocol_connect(data->easy_conn, &protocol_connect); - if(!protocol_connect) + if(!result && !protocol_connect) /* switch to waiting state */ multistate(data, CURLM_STATE_PROTOCONNECT); else if(!result) {