diff options
Diffstat (limited to 'lib/qssl.c')
-rw-r--r-- | lib/qssl.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/qssl.c b/lib/qssl.c index e65a0e2f6..d89f01730 100644 --- a/lib/qssl.c +++ b/lib/qssl.c @@ -175,8 +175,13 @@ static CURLcode Curl_qsossl_handshake(struct connectdata * conn, int sockindex) /* figure out how long time we should wait at maximum */ timeout_ms = Curl_timeleft(conn, NULL, TRUE); - /* SSL_Handshake() timeout resolution is second, so round up. */ + if(timeout_ms < 0) { + /* time-out, bail out, go home */ + failf(data, "Connection time-out"); + return CURLE_OPERATION_TIMEDOUT; + } + /* SSL_Handshake() timeout resolution is second, so round up. */ h->timeout = (timeout_ms + 1000 - 1) / 1000; /* Set-up protocol. */ @@ -429,7 +434,7 @@ ssize_t Curl_qsossl_recv(struct connectdata * conn, int num, char * buf, case SSL_ERROR_IO: switch (errno) { case EWOULDBLOCK: - *wouldblock = TRUE; + *wouldblock = TRUE; return -1; } |