1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

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
This commit is contained in:
Michael Kaufmann 2018-10-25 13:07:03 +02:00
parent 4441d3c548
commit 3793761a37

View File

@ -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) {