From eb84412b33aa9cbe109d3e2874f9dbba48043263 Mon Sep 17 00:00:00 2001 From: Martin Frodl Date: Mon, 24 Oct 2016 17:44:45 +0200 Subject: nss: fix tight loop in non-blocking TLS handhsake over proxy ... in case the handshake completes before entering CURLM_STATE_PROTOCONNECT Bug: https://bugzilla.redhat.com/1388162 --- lib/vtls/nss.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/vtls') diff --git a/lib/vtls/nss.c b/lib/vtls/nss.c index 8c945548a..214c2240e 100644 --- a/lib/vtls/nss.c +++ b/lib/vtls/nss.c @@ -1921,8 +1921,11 @@ static CURLcode nss_connect_common(struct connectdata *conn, int sockindex, const bool blocking = (done == NULL); CURLcode result; - if(connssl->state == ssl_connection_complete) + if(connssl->state == ssl_connection_complete) { + if(!blocking) + *done = TRUE; return CURLE_OK; + } if(connssl->connecting_state == ssl_connect_1) { result = nss_setup_connect(conn, sockindex); -- cgit v1.2.3