diff options
author | Andreas Streichardt <andreas@arangodb.com> | 2016-10-10 13:08:24 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2016-10-10 14:14:20 +0200 |
commit | eb5199317ee729ab1893fc629a8f4f0ca7f7aa1e (patch) | |
tree | 01d5804e5050a6c245ad078e921cb4c75c8d1f64 /lib | |
parent | 7cc9c876e84368e02cc306959379e21eeabd4d36 (diff) |
resolve: add error message when resolving using SIGALRM
Closes #1066
Diffstat (limited to 'lib')
-rw-r--r-- | lib/hostip.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/hostip.c b/lib/hostip.c index f2d984164..24a922eb2 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -603,11 +603,14 @@ int Curl_resolv_timeout(struct connectdata *conn, /* USE_ALARM_TIMEOUT defined, but no timeout actually requested */ return Curl_resolv(conn, hostname, port, entry); - if(timeout < 1000) + if(timeout < 1000) { /* The alarm() function only provides integer second resolution, so if 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; - + } /* This allows us to time-out from the name resolver, as the timeout will generate a signal and we will siglongjmp() from that here. This technique has problems (see alarmfunc). |