Add option for timeout less than a second
Hi, Thanks for Curly, he saved my Vapor service, without it I had a really weird CPU/Memory problem on Linux.
Right now the timeout option (--max-time) is an Int, but I would love to have it (Double) to reduce the timeout in multiple cases.
What do you think?
Looks like that on linux the option max-time doesn't support a time less than a second.
Hi!
I think this is an idea worth investigating, thanks for the feedback. While the --max-time command line option is limited, there are two versions of all the timeout options on the C API level.
The one that's exposed by CURLRequest and then by Curly takes seconds, but millisecond precision should be possible via the CURLOPT_TIMEOUT_MS and CURLOPT_CONNECTTIMEOUT_MS options.
I'll see if they work and if they do, I'll extend the CurlyOptions with more precision in a new release.