Skip to content

Upped the timeout for curl to 15 seconds to match other code#6750

Merged
MikeMcQuaid merged 1 commit intoHomebrew:masterfrom
fuddlesworth:curl-fix
Nov 20, 2019
Merged

Upped the timeout for curl to 15 seconds to match other code#6750
MikeMcQuaid merged 1 commit intoHomebrew:masterfrom
fuddlesworth:curl-fix

Conversation

@fuddlesworth
Copy link
Copy Markdown
Contributor

@fuddlesworth fuddlesworth commented Nov 16, 2019

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew tests with your changes locally?

The default --connect-timeout=5 argument for curl is too small and is preventing many packages from properly installing.

nathan@UNICORNVOMIT:~$ /usr/bin/curl -q --globoff --show-error --user-agent Linuxbrew/2.1.16\ \(Linux\;\ x86_64\ Ubuntu\ 18.04.3\ LTS\)\ curl/7.58.0 --fail --location --remote-time --continue-at 0 --output /home/nathan/.cache/Homebrew/downloads/38643e81048ad5dcd6482ba07097ed3e62ae22dfdb272a8187d0745c1cde60b1--sbt-1.3.3.tgz.incomplete https://sbt-downloads.cdnedge.bluemix.net/releases/v1.3.3/sbt-1.3.3.tgz --connect-timeout 5
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:05 --:--:--     0
curl: (28) Resolving timed out after 5552 milliseconds
nathan@UNICORNVOMIT:~$ /usr/bin/curl -q --globoff --show-error --user-agent Linuxbrew/2.1.16\ \(Linux\;\ x86_64\ Ubuntu\ 18.04.3\ LTS\)\ curl/7.58.0 --fail --location --remote-time --continue-at 0 --output /home/nathan/.cache/Homebrew/downloads/38643e81048ad5dcd6482ba07097ed3e62ae22dfdb272a8187d0745c1cde60b1--sbt-1.3.3.tgz.incomplete https://sbt-downloads.cdnedge.bluemix.net/releases/v1.3.3/sbt-1.3.3.tgz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 49.4M  100 49.4M    0     0  3221k      0  0:00:15  0:00:15 --:--:-- 11.9M

The default value also does not match the --connect-timeout value in other places show here.

nathan@UNICORNVOMIT:/home/linuxbrew/.linuxbrew$ pt connect-timeout
./Homebrew/Library/Homebrew/download_strategy.rb
440:    args << "--connect-timeout" << "5" unless mirrors.empty?

./Homebrew/Library/Homebrew/dev-cmd/pull.rb
464:    headers, = curl_output("--connect-timeout", "15", "--location", "--head", url)

./Homebrew/Library/Homebrew/utils/curl.rb
192:    "--connect-timeout", "15", "--max-time", max_time, url,

Copy link
Copy Markdown
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable! Thanks so much for your first contribution! Without people like you submitting PRs we couldn't run this project. You rock, @MrKumaPants!

@MikeMcQuaid MikeMcQuaid merged commit b62758a into Homebrew:master Nov 20, 2019
@lock lock bot added the outdated PR was locked due to age label Jan 1, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated PR was locked due to age

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants