[前][次][番号順一覧][スレッド一覧]

ruby-changes:49647

From: k0kubun <ko1@a...>
Date: Thu, 11 Jan 2018 00:44:58 +0900 (JST)
Subject: [ruby-changes:49647] k0kubun:r61762 (trunk): tool/downloader.rb: retry against Errno::ETIMEDOUT

k0kubun	2018-01-11 00:44:52 +0900 (Thu, 11 Jan 2018)

  New Revision: 61762

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61762

  Log:
    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.

  Modified files:
    trunk/tool/downloader.rb
Index: tool/downloader.rb
===================================================================
--- tool/downloader.rb	(revision 61761)
+++ tool/downloader.rb	(revision 61762)
@@ -161,7 +161,7 @@ class Downloader https://github.com/ruby/ruby/blob/trunk/tool/downloader.rb#L161
       $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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]