diff options
author | Daniel Stenberg <daniel@haxx.se> | 2008-02-11 22:03:31 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2008-02-11 22:03:31 +0000 |
commit | fcc320ee404606b7f9d4d140e7770a0f8dd2754d (patch) | |
tree | 6de4df1001ba130d74af3790c30bf0f34feabde7 /lib/qssl.c | |
parent | dc9fe9c3610fe96554978d4b2f6090ac7887ef79 (diff) |
Yang Tse pointed out a few remaining quirks from my timeout refactoring from
Feb 7 that didn't abort properly on timeouts. These are actually old
problems but now they should be fixed.
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; } |