|
Posted by Rik on 04/26/07 17:31
news wrote:
> Hi,
> I'm having a problem with the cURL library.
> It doesn't seem to obey the 'timeout' parameters.
>
> I set the CURLOPT_CONNECTTIMEOUT to, say, 1 second,
> and CURLOPT_TIMEOUT to whatever value.
>
> Then I'm fetching (via a GET request) some page from a _nonexistent_
> domain - and I have to wait around 4 seconds
> for the timeout error to show up. (name lookup error)
>
> So - what's the use of CONNECTTIMEOUT and TIMEOUT?
> Why I have to wait 4 seconds, while I set the connect timeout
> to 1 second?
Well, maybe looking up an ip for the host might not be counted as valid
for the timeout (which might be time to let the server respond, and we
first have to know that server). What happens if you choose a
non-existent ip instead of DNS?
--
Rik Wasmus
Estimated date being able to walk again: 01-05-2007.
Less then a week, hurray!
Navigation:
[Reply to this message]
|