summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-10 15:44:52 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-10 15:44:52 +0000
commit35e631273ab8beae181af0f648bc9c7d0041a890 (patch)
tree428108ba67ceacd7daa082ff9821adb7f5b2dbba
parent9c650ee3a71e3b86e19bdf2633476cb297533cf6 (diff)
downloadruby-35e631273ab8beae181af0f648bc9c7d0041a890.tar.gz
tool/downloader.rb: retry against Errno::ETIMEDOUT
instead of Errno::ECONNREFUSED. As I commented in r61498, at that moment I was not sure if the actual exception is really `Errno::ECONNREFUSED` or not. In https://ci.appveyor.com/project/ruby/ruby/build/1.0.6974, I could confirm that the download can fail with `Errno::ETIMEDOUT`. So I want to retry that. Let's add `Errno::ECONNREFUSED` too if it fails with the exception. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--tool/downloader.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/downloader.rb b/tool/downloader.rb
index 640a55ab45..4cd41afbdc 100644
--- a/tool/downloader.rb
+++ b/tool/downloader.rb
@@ -161,7 +161,7 @@ class Downloader
$stdout.flush
end
begin
- data = with_retry(3, Errno::ECONNREFUSED) do
+ data = with_retry(3, Errno::ETIMEDOUT) do
url.read(options.merge(http_options(file, since.nil? ? true : since)))
end
rescue OpenURI::HTTPError => http_error