]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
proxy: skip SSL initialization for closed connections
authorMichael Kaufmann <mail@michael-kaufmann.ch>
Fri, 10 Mar 2017 22:57:09 +0000 (23:57 +0100)
committerMichael Kaufmann <mail@michael-kaufmann.ch>
Sat, 11 Mar 2017 17:59:01 +0000 (18:59 +0100)
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

lib/http.c

index ebc005060b8f78e8b6cae66f521112b836b7f873..3f3553abbbf0c050fbe7ccee390af4c95831a01a 100644 (file)
@@ -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 */