diff options
| author | Paul Dreik <github@pauldreik.se> | 2019-09-23 13:10:12 +0200 |
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2019-09-23 22:38:15 +0200 |
| commit | bb7420180497f6087cd2d894253beb2532a0569e (patch) | |
| tree | 9788d42a91d7a4ab78d094b934c26f2ff54e79f0 | |
| parent | 0023fce38d3bd6ee0e9b6ff8708fee1195057846 (diff) | |
doh: return early if there is no time left
Closes #4406
| -rw-r--r-- | lib/doh.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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) { |
