Skip to content

Conversation

@siliconforks
Copy link

This implements the suggestion made in #264 to check for CURL_VERSION_ASYNCHDNS to determine whether timeouts of less than 1 second will work.

See also: https://core.trac.wordpress.org/ticket/63547

Pull Request Type

  • I have checked there is no other PR open for the same change.

This is a:

  • Bug fix
  • New feature
  • Documentation improvement
  • Code quality improvement

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_ASYNCHDNS previously 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

  • This change does NOT contain a breaking change (fix or feature that would cause existing functionality to change).
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added unit tests to accompany this PR.
  • The (new/existing) tests cover this PR 100%.
  • I have (manually) tested this code to the best of my abilities.
  • My code follows the style guidelines of this project.

Documentation

For new features:

  • I have added a code example showing how to use this feature to the examples directory.
  • I have added documentation about this feature to the docs directory.
    If the documentation is in a new markdown file, I have added a link to this new file to the Docs folder README.md file.

This implements the suggestion made in WordPress#264 to check for
CURL_VERSION_ASYNCHDNS to determine whether timeouts of less than 1
second will work.

See also: https://core.trac.wordpress.org/ticket/63547
@pmbaldha
Copy link

The PR changes are working fine. I have created the related test report on https://core.trac.wordpress.org/ticket/63547#comment:17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants