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.
This commit is contained in:
Daniel Stenberg
2008-02-11 22:03:31 +00:00
parent dc9fe9c361
commit fcc320ee40
4 changed files with 43 additions and 9 deletions

View File

@@ -140,6 +140,12 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
/* get timeout */
timeout = Curl_timeleft(conn, NULL, TRUE);
if(timeout < 0) {
/* time-out, bail out, go home */
failf(data, "Connection time-out");
return CURLE_OPERATION_TIMEDOUT;
}
Curl_nonblock(sock, FALSE);
/*
@@ -394,6 +400,12 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
/* get timeout */
timeout = Curl_timeleft(conn, NULL, TRUE);
if(timeout < 0) {
/* time-out, bail out, go home */
failf(data, "Connection time-out");
return CURLE_OPERATION_TIMEDOUT;
}
Curl_nonblock(sock, TRUE);
/* wait until socket gets connected */