From 1b701c746f66b8fd5bf3017c36254dbde8456df2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 7 Feb 2008 22:25:04 +0000 Subject: - Refactored a lot of timeout code into a few functions in an attempt to make them all use the same (hopefully correct) logic to make it less error-prone and easier to introduce library-wide where it should be used. --- lib/qssl.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'lib/qssl.c') diff --git a/lib/qssl.c b/lib/qssl.c index 4ced8b744..e65a0e2f6 100644 --- a/lib/qssl.c +++ b/lib/qssl.c @@ -172,17 +172,8 @@ static CURLcode Curl_qsossl_handshake(struct connectdata * conn, int sockindex) if(!data->set.ssl.verifyhost) h->exitPgm = Curl_qsossl_trap_cert; - if(data->set.connecttimeout) { - timeout_ms = data->set.connecttimeout; - - if(data->set.timeout) - if(timeout_ms > data->set.timeout) - timeout_ms = data->set.timeout; - } - else if(data->set.timeout) - timeout_ms = data->set.timeout; - else - timeout_ms = DEFAULT_CONNECT_TIMEOUT; + /* 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. */ -- cgit v1.2.3