diff --git a/lib/ssluse.c b/lib/ssluse.c index d0eaadede..d8f776018 100644 --- a/lib/ssluse.c +++ b/lib/ssluse.c @@ -2371,6 +2371,12 @@ ossl_connect_common(struct connectdata *conn, long timeout_ms; int what; + /* check if the connection has already been established */ + if(ssl_connection_complete == connssl->state) { + *done = TRUE; + return CURLE_OK; + } + if(ssl_connect_1==connssl->connecting_state) { /* Find out how much more time we're allowed */ timeout_ms = Curl_timeleft(conn, NULL, TRUE);