ruby-changes:53891
From: k0kubun <ko1@a...>
Date: Sat, 1 Dec 2018 09:37:58 +0900 (JST)
Subject: [ruby-changes:53891] k0kubun:r66110 (trunk): tool/downloader.rb: retry Net::OpenTimeout
k0kubun 2018-12-01 09:37:54 +0900 (Sat, 01 Dec 2018) New Revision: 66110 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66110 Log: tool/downloader.rb: retry Net::OpenTimeout to prevent random failure https://travis-ci.org/ruby/ruby/jobs/461667474 Modified files: trunk/tool/downloader.rb Index: tool/downloader.rb =================================================================== --- tool/downloader.rb (revision 66109) +++ tool/downloader.rb (revision 66110) @@ -271,7 +271,7 @@ class Downloader https://github.com/ruby/ruby/blob/trunk/tool/downloader.rb#L271 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/