Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve timeouts accuracy and node v6.8.0+ compatibility #2431

Merged
merged 3 commits into from Oct 20, 2016

Commits on Oct 14, 2016

  1. Do not pass timeout to http.request()

    node v6.8.0 supports a `timeout` option now, so we should
    explicitly delete it in case the value is < 0 (in which case
    node will throw an error). Handling timeouts manually for now
    is better for consistency with older node versions.
    mscdex committed Oct 14, 2016
    Copy the full SHA
    74e9813 View commit details
    Browse the repository at this point in the history
  2. Make timeouts more accurate

    Prior to this commit, the connection timeout could include some
    amount of time that passes before the socket actually starts its
    connection attempt.
    
    Additionally, this commit only starts the request timeout once a
    connection is made. This helps to prevent an issue where one kind of
    timeout is seen instead of another (ETIMEDOUT vs ESOCKETTIMEOUT)
    while connecting in some situations (depending on OS and possibly
    node version).
    mscdex committed Oct 14, 2016
    Copy the full SHA
    1ef4075 View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2016

  1. Copy the full SHA
    285d49d View commit details
    Browse the repository at this point in the history