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:
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 */
|
||||
|
Reference in New Issue
Block a user