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
This commit is contained in:
parent
b173fc92c0
commit
288e27899b
@ -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..."
|
||||
|
Loading…
x
Reference in New Issue
Block a user