aboutsummaryrefslogtreecommitdiffstats
path: root/tool/downloader.rb
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-18 02:04:44 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-18 02:04:44 +0000
commit3345c9a8d7a752806968556f2bfb9643e84b80c0 (patch)
tree49b49ff17b98303418f2b27c22eb5d762adefd91 /tool/downloader.rb
parentba989865bda275016f8b3c616a4795b846e7dc2a (diff)
downloadruby-3345c9a8d7a752806968556f2bfb9643e84b80c0.tar.gz
tool/downloader.rb: retry 500 from GitHub
Unfortunately, GitHub may return 500 for temporary failure: https://travis-ci.org/ruby/ruby/builds/417246523 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/downloader.rb')
-rw-r--r--tool/downloader.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/downloader.rb b/tool/downloader.rb
index 23c81ee6cb..bf5498f42d 100644
--- a/tool/downloader.rb
+++ b/tool/downloader.rb
@@ -272,7 +272,7 @@ class Downloader
begin
block.call
rescue Errno::ETIMEDOUT, SocketError, OpenURI::HTTPError => e
- raise if e.is_a?(OpenURI::HTTPError) && e.message !~ /^50[23] / # retry only 502, 503 for http error
+ raise if e.is_a?(OpenURI::HTTPError) && e.message !~ /^50[023] / # retry only 500, 502, 503 for http error
times += 1
if times <= max_times
$stderr.puts "retrying #{e.class} (#{e.message}) after #{times ** 2} seconds..."