cURL / Mailing Lists / curl-library / Single Mail


Re: result of curl_perform() timeout

From: Daniel Stenberg <>
Date: Fri, 13 Jan 2012 09:02:59 +0100 (CET)

On Thu, 12 Jan 2012, Khaled El Mously wrote:

> curl_easy_setopt(cURL, CURLOPT_TIMEOUT, 5);

> I expect the curl_ret_status to be "CURLE_OPERATION_TIMEDOUT" if
> curl_easy_perform() takes more than 5 seconds. However, when the operation
> times out, I get instead "CURLE_COULDNT_RESOLVE_HOST". Is this expected? How
> can one differentiate between an unresolvable host and an actual time-out?

It might be a plain bug. It is worth checking out the code and see if there's
something obvious we can do.

It could also be that we have an internal timeout already and if that is
reached we consider the host unresolvable so the code doesn't quite know which
timeout that is met.

List admin:
Received on 2012-01-13