Allow sub-second timeouts where feasible #932
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This implements the suggestion made in #264 to check for
CURL_VERSION_ASYNCHDNSto determine whether timeouts of less than 1 second will work.See also: https://core.trac.wordpress.org/ticket/63547
Pull Request Type
This is a:
Context
The goal is to allow timeouts of less than one second on systems where this is feasible. This might not be possible for all systems, but it should be achievable for on machines with cURL which has been built with support for asynchronous DNS lookups.
Detailed Description
This PR simply adds the check for
CURL_VERSION_ASYNCHDNSpreviously discussed in #264, to allow timeouts of less than 1 second on systems where this will work, i.e., those not using the (synchronous) system resolver.Note that the conversation in #264 went on to discuss some other things, which this PR does not attempt to address. This PR only adds the check for
CURL_VERSION_ASYNCHDNS.Quality assurance
Documentation
For new features:
examplesdirectory.docsdirectory.If the documentation is in a new markdown file, I have added a link to this new file to the Docs folder
README.mdfile.