mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
tool/downloader.rb: retry Net::OpenTimeout
to prevent random failure https://travis-ci.org/ruby/ruby/jobs/461667474 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5d3aa0ac58
commit
57005046a1
1 changed files with 1 additions and 1 deletions
|
@ -271,7 +271,7 @@ class Downloader
|
|||
times = 0
|
||||
begin
|
||||
block.call
|
||||
rescue Errno::ETIMEDOUT, SocketError, OpenURI::HTTPError, Net::ReadTimeout => e
|
||||
rescue Errno::ETIMEDOUT, SocketError, OpenURI::HTTPError, Net::ReadTimeout, Net::OpenTimeout => e
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue