aboutsummaryrefslogtreecommitdiff
path: root/lib/multi.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/multi.c')
-rw-r--r--lib/multi.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/multi.c b/lib/multi.c
index a2a4eb50b..f49d42699 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -1009,7 +1009,17 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
/* this is HTTP-specific, but sending CONNECT to a proxy is HTTP... */
easy->result = Curl_http_connect(easy->easy_conn, &protocol_connect);
- if(CURLE_OK == easy->result) {
+ if(easy->easy_conn->bits.proxy_connect_closed) {
+ /* reset the error buffer */
+ if(easy->easy_handle->set.errorbuffer)
+ easy->easy_handle->set.errorbuffer[0] = '\0';
+ easy->easy_handle->state.errorbuf = FALSE;
+
+ easy->result = CURLE_OK;
+ result = CURLM_CALL_MULTI_PERFORM;
+ multistate(easy, CURLM_STATE_CONNECT);
+ }
+ else if (CURLE_OK == easy->result) {
if(!easy->easy_conn->bits.tunnel_connecting)
multistate(easy, CURLM_STATE_WAITCONNECT);
}