mirror of
https://github.com/curl/curl.git
synced 2025-09-20 19:12:40 +03:00
parent
7cc9c876e8
commit
eb5199317e
|
@ -603,11 +603,14 @@ int Curl_resolv_timeout(struct connectdata *conn,
|
||||||
/* USE_ALARM_TIMEOUT defined, but no timeout actually requested */
|
/* USE_ALARM_TIMEOUT defined, but no timeout actually requested */
|
||||||
return Curl_resolv(conn, hostname, port, entry);
|
return Curl_resolv(conn, hostname, port, entry);
|
||||||
|
|
||||||
if(timeout < 1000)
|
if(timeout < 1000) {
|
||||||
/* The alarm() function only provides integer second resolution, so if
|
/* The alarm() function only provides integer second resolution, so if
|
||||||
we want to wait less than one second we must bail out already now. */
|
we want to wait less than one second we must bail out already now. */
|
||||||
|
failf(data,
|
||||||
|
"remaining timeout of %ld too small to resolve via SIGALRM method",
|
||||||
|
timeout);
|
||||||
return CURLRESOLV_TIMEDOUT;
|
return CURLRESOLV_TIMEDOUT;
|
||||||
|
}
|
||||||
/* This allows us to time-out from the name resolver, as the timeout
|
/* This allows us to time-out from the name resolver, as the timeout
|
||||||
will generate a signal and we will siglongjmp() from that here.
|
will generate a signal and we will siglongjmp() from that here.
|
||||||
This technique has problems (see alarmfunc).
|
This technique has problems (see alarmfunc).
|
||||||
|
|
Loading…
Reference in New Issue
Block a user