multi_runsingle: avoid loop in CURLM_STATE_WAITPROXYCONNECT

Closes #703
This commit is contained in:
Maksim Kuzevanov 2016-03-07 19:37:49 +03:00 committed by Daniel Stenberg
parent d807fbd66d
commit d7e3942814
1 changed files with 4 additions and 2 deletions

View File

@ -1230,17 +1230,19 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
/* this is HTTP-specific, but sending CONNECT to a proxy is HTTP... */ /* this is HTTP-specific, but sending CONNECT to a proxy is HTTP... */
result = Curl_http_connect(data->easy_conn, &protocol_connect); result = Curl_http_connect(data->easy_conn, &protocol_connect);
rc = CURLM_CALL_MULTI_PERFORM;
if(data->easy_conn->bits.proxy_connect_closed) { if(data->easy_conn->bits.proxy_connect_closed) {
rc = CURLM_CALL_MULTI_PERFORM;
/* connect back to proxy again */ /* connect back to proxy again */
result = CURLE_OK; result = CURLE_OK;
Curl_done(&data->easy_conn, CURLE_OK, FALSE); Curl_done(&data->easy_conn, CURLE_OK, FALSE);
multistate(data, CURLM_STATE_CONNECT); multistate(data, CURLM_STATE_CONNECT);
} }
else if(!result) { 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 */ /* initiate protocol connect phase */
multistate(data, CURLM_STATE_SENDPROTOCONNECT); multistate(data, CURLM_STATE_SENDPROTOCONNECT);
}
} }
break; break;
#endif #endif