- 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.
This commit is contained in:
Daniel Stenberg
2008-02-07 22:25:04 +00:00
parent 15bf168527
commit 1b701c746f
10 changed files with 123 additions and 181 deletions

View File

@@ -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. */