mirror of
https://github.com/curl/curl.git
synced 2025-01-18 14:04:30 +08:00
hostip.c: return immediately from Curl_resolv_timeout() upon expired timeout.
Ensure existing logic in Curl_resolv_timeout() is not subverted upon getting a negative timeout from resolve_server(). The timeout in resolve_server() could be checked to avoid calling Curl_resolv_timeout() with an expired timeout, but fixing this in this way allows existing logic in resolve_server() to be kept unchanged.
This commit is contained in:
parent
fdf157abdf
commit
f2285a6d39
@ -554,6 +554,10 @@ int Curl_resolv_timeout(struct connectdata *conn,
|
|||||||
|
|
||||||
*entry = NULL;
|
*entry = NULL;
|
||||||
|
|
||||||
|
if(timeoutms < 0)
|
||||||
|
/* got an already expired timeout */
|
||||||
|
return CURLRESOLV_TIMEDOUT;
|
||||||
|
|
||||||
#ifdef USE_ALARM_TIMEOUT
|
#ifdef USE_ALARM_TIMEOUT
|
||||||
if(data->set.no_signal)
|
if(data->set.no_signal)
|
||||||
/* Ignore the timeout when signals are disabled */
|
/* Ignore the timeout when signals are disabled */
|
||||||
|
Loading…
Reference in New Issue
Block a user