diff options
author | Martin Frodl <mfrodl@redhat.com> | 2016-10-24 17:44:45 +0200 |
---|---|---|
committer | Kamil Dudka <kdudka@redhat.com> | 2016-10-25 11:56:37 +0200 |
commit | eb84412b33aa9cbe109d3e2874f9dbba48043263 (patch) | |
tree | f1813246483064c8f9359e435fcffc48f631f4bf /lib/vtls | |
parent | d2c6d1568e85b97cf3a74437709c52885da6aab8 (diff) | |
download | curl-eb84412b33aa9cbe109d3e2874f9dbba48043263.tar.gz |
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
Diffstat (limited to 'lib/vtls')
-rw-r--r-- | lib/vtls/nss.c | 5 |
1 files changed, 4 insertions, 1 deletions
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); |