aboutsummaryrefslogtreecommitdiff
path: root/lib/hostip.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/hostip.c')
-rw-r--r--lib/hostip.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/hostip.c b/lib/hostip.c
index e857dced4..d261a163a 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -554,6 +554,10 @@ int Curl_resolv_timeout(struct connectdata *conn,
*entry = NULL;
+ if(timeoutms < 0)
+ /* got an already expired timeout */
+ return CURLRESOLV_TIMEDOUT;
+
#ifdef USE_ALARM_TIMEOUT
if(data->set.no_signal)
/* Ignore the timeout when signals are disabled */