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 ebc0050..3f3553a 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -1359,6 +1359,10 @@
   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 */