aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/doh.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/doh.c b/lib/doh.c
index 5a76d6d87..05a6cc235 100644
--- a/lib/doh.c
+++ b/lib/doh.c
@@ -240,7 +240,10 @@ static CURLcode dohprobe(struct Curl_easy *data,
}
timeout_ms = Curl_timeleft(data, NULL, TRUE);
-
+ if(timeout_ms <= 0) {
+ result = CURLE_OPERATION_TIMEDOUT;
+ goto error;
+ }
/* Curl_open() is the internal version of curl_easy_init() */
result = Curl_open(&doh);
if(!result) {