From 35e631273ab8beae181af0f648bc9c7d0041a890 Mon Sep 17 00:00:00 2001 From: k0kubun Date: Wed, 10 Jan 2018 15:44:52 +0000 Subject: 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 --- tool/downloader.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tool') 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 -- cgit v1.2.3