From: Michael Kaufmann Date: Fri, 10 Mar 2017 22:57:09 +0000 (+0100) Subject: proxy: skip SSL initialization for closed connections X-Git-Tag: curl-7_54_0~138 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e84a863dc37f81bca066838a76e1b461c3cabeaf;p=thirdparty%2Fcurl.git proxy: skip SSL initialization for closed connections This prevents a "Descriptor is not a socket" error for WinSSL. Reported-by: Antony74@users.noreply.github.com Reviewed-by: Jay Satiro Fixes https://github.com/curl/curl/issues/1239 --- diff --git a/lib/http.c b/lib/http.c index ebc005060b..3f3553abbb 100644 --- a/lib/http.c +++ b/lib/http.c @@ -1359,6 +1359,10 @@ CURLcode Curl_http_connect(struct connectdata *conn, bool *done) if(result) return result; + if(conn->bits.proxy_connect_closed) + /* this is not an error, just part of the connection negotiation */ + return CURLE_OK; + if(CONNECT_FIRSTSOCKET_PROXY_SSL()) return CURLE_OK; /* wait for HTTPS proxy SSL initialization to complete */