summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaksim Kuzevanov <m.kuzevanov@corp.mail.ru>2016-03-07 19:37:49 +0300
committerDaniel Stenberg <daniel@haxx.se>2016-03-13 12:41:17 +0100
commitd7e3942814e0c3a24069a0888da4b2431bafe44a (patch)
tree76770fcc32ed63e6b439b21c4bd342099eeb3f9a
parentd807fbd66daaa71bc83833e811b7c49800010b19 (diff)
downloadcurl-d7e3942814e0c3a24069a0888da4b2431bafe44a.tar.gz
multi_runsingle: avoid loop in CURLM_STATE_WAITPROXYCONNECT
Closes #703
-rw-r--r--lib/multi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/multi.c b/lib/multi.c
index 6a1f7c82b..4411a1814 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -1230,17 +1230,19 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
/* this is HTTP-specific, but sending CONNECT to a proxy is HTTP... */
result = Curl_http_connect(data->easy_conn, &protocol_connect);
- rc = CURLM_CALL_MULTI_PERFORM;
if(data->easy_conn->bits.proxy_connect_closed) {
+ rc = CURLM_CALL_MULTI_PERFORM;
/* connect back to proxy again */
result = CURLE_OK;
Curl_done(&data->easy_conn, CURLE_OK, FALSE);
multistate(data, CURLM_STATE_CONNECT);
}
else if(!result) {
- if(data->easy_conn->tunnel_state[FIRSTSOCKET] == TUNNEL_COMPLETE)
+ if(data->easy_conn->tunnel_state[FIRSTSOCKET] == TUNNEL_COMPLETE) {
+ rc = CURLM_CALL_MULTI_PERFORM;
/* initiate protocol connect phase */
multistate(data, CURLM_STATE_SENDPROTOCONNECT);
+ }
}
break;
#endif