1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

doh: return early if there is no time left

Closes #4406
This commit is contained in:
Paul Dreik 2019-09-23 13:10:12 +02:00 committed by Daniel Stenberg
parent 0023fce38d
commit bb74201804
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -240,7 +240,10 @@ static CURLcode dohprobe(struct Curl_easy *data,
} }
timeout_ms = Curl_timeleft(data, NULL, TRUE); 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() */ /* Curl_open() is the internal version of curl_easy_init() */
result = Curl_open(&doh); result = Curl_open(&doh);
if(!result) { if(!result) {