aboutsummaryrefslogtreecommitdiff
path: root/lib/multi.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/multi.c')
-rw-r--r--lib/multi.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/multi.c b/lib/multi.c
index ca975a056..1e5b3c8df 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -1137,11 +1137,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
data->result = Curl_http_connect(data->easy_conn, &protocol_connect);
if(data->easy_conn->bits.proxy_connect_closed) {
- /* reset the error buffer */
- if(data->set.errorbuffer)
- data->set.errorbuffer[0] = '\0';
- data->state.errorbuf = FALSE;
-
+ /* connect back to proxy again */
data->result = CURLE_OK;
result = CURLM_CALL_MULTI_PERFORM;
multistate(data, CURLM_STATE_CONNECT);
@@ -1167,7 +1163,15 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
&protocol_connect);
}
- if(CURLE_OK != data->result) {
+ if(data->easy_conn->bits.proxy_connect_closed) {
+ /* connect back to proxy again since it was closed in a proxy CONNECT
+ setup */
+ data->result = CURLE_OK;
+ result = CURLM_CALL_MULTI_PERFORM;
+ multistate(data, CURLM_STATE_CONNECT);
+ break;
+ }
+ else if(CURLE_OK != data->result) {
/* failure detected */
/* Just break, the cleaning up is handled all in one place */
disconnect_conn = TRUE;