aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-08-05 19:44:34 -0500
committerJack Nagel2013-08-06 12:54:47 -0500
commit089153bd46360b3d49d83a0151c7cc59f970b01c (patch)
treeea8eb973f92934e98f026121dcfda95d11ce8959 /Library
parenta3fb44b9aa87bf6174b8fb404a49d9bd4f63bb46 (diff)
downloadhomebrew-089153bd46360b3d49d83a0151c7cc59f970b01c.tar.bz2
Enable connection timeouts when mirrors are available
Closes #21623.
Diffstat (limited to 'Library')
-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