curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Curl timeout option in milliseconds

From: Daniel Stenberg via curl-library <>
Date: Fri, 15 Nov 2019 14:54:04 +0100 (CET)

> Cases 1, 2 and 3 work fine but timeout occurs wrongly in cases 4 and 5.
> Please correct me if my understanding here is wrong.

Didn't this change the behavior? Your original statement said sub second
timeouts still took a full second but in this output it looks like they failed

You also never answered my question about what resolver backend your build is
using but I think that the above behavior answers it for me with enough

I think libcurl returns an error for you due to this condition:

... this is because you've built libcurl to use the synchronous name resolver
and we can only time-out that with signal() and that function only has integer
second resolution. If you ask for a shorter timeout, that can't be fullfilled.

libcurl defaults to using the threaded resolver these days which will fire up
the resolver in a sepearate thread that can be abandonded easier and in less
than a second.

  / | Get the best commercial curl support there is - from me
                   | Private help, bug fixes, support, ports, new features
Received on 2019-11-15