mirror of
https://github.com/curl/curl.git
synced 2026-08-25 10:43:34 +03:00
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:
parent
dc9fe9c361
commit
fcc320ee40
4 changed files with 43 additions and 9 deletions
12
lib/socks.c
12
lib/socks.c
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue