aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichael Kaufmann <mail@michael-kaufmann.ch>2018-10-25 13:07:03 +0200
committerMichael Kaufmann <mail@michael-kaufmann.ch>2018-10-27 13:03:50 +0200
commit3793761a3777095d643e9f2da951615e1178782c (patch)
treeb41d985c5b457e2921bd50550ead3ad91c4b1618 /lib
parent4441d3c548091913b1e42a3b92fbb137dadbbe5d (diff)
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
Diffstat (limited to 'lib')
-rw-r--r--lib/multi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/multi.c b/lib/multi.c
index 7c691a1b8..0db2a9730 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) {