aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorJack Nagel2013-08-05 19:44:34 -0500
committerJack Nagel2013-08-06 12:54:47 -0500
commit3dea34173241ef890b94b516ecf700b456c07472 (patch)
tree04df2d30c2ee7108cc9e41879489ff8fb5f3224c /Library/Homebrew
parent5600713bbba68bf4aa27de8a88edc47ecef4e155 (diff)
downloadbrew-3dea34173241ef890b94b516ecf700b456c07472.tar.bz2
Enable connection timeouts when mirrors are available
Closes Homebrew/homebrew#21623.
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/download_strategy.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index 17ee4143f..bf1b1b1de 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -144,6 +144,11 @@ class CurlDownloadStrategy < AbstractDownloadStrategy
private
+ def curl(*args)
+ args << '--connect-timeout' << '5' unless @mirrors.empty?
+ super
+ end
+
def xzpath
"#{HOMEBREW_PREFIX}/opt/xz/bin/xz"
end