Commit fb531b8

mo <mo@mokhan.ca>
2018-11-11 04:36:05
revert constant name.
1 parent aa895cf
Changed files (2)
lib/net/hippie/client.rb
@@ -88,7 +88,7 @@ module Net
 
       def attempt(attempt, max)
         yield
-      rescue *TIMEOUT_ERRORS => error
+      rescue *CONNECTION_ERRORS => error
         raise error if attempt == max
 
         delay = ((2**attempt) * 0.1) + Random.rand(0.05) # delay + jitter
lib/net/hippie.rb
@@ -14,9 +14,12 @@ require 'net/hippie/api'
 module Net
   # net/http for hippies.
   module Hippie
-    TIMEOUT_ERRORS = [
-      EOFError, Errno::ECONNRESET, Errno::EINVAL,
-      Net::ProtocolError, Timeout::Error
+    CONNECTION_ERRORS = [
+      EOFError,
+      Errno::ECONNRESET,
+      Errno::EINVAL,
+      Net::ProtocolError,
+      Timeout::Error
     ].freeze
 
     def self.logger