End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Net::HTTP#max_retries=
max_retries=(retries)
lib/net/http.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/lib/net/http.rb, line 804
def max_retries=(retries)
retries = retries.to_int
if retries < 0
raise ArgumentError, 'max_retries should be non-negative integer number'
end
@max_retries = retries
end
Maximum number of times to retry an idempotent request in case of Net::ReadTimeout, IOError, EOFError, Errno::ECONNRESET, Errno::ECONNABORTED, Errno::EPIPE, OpenSSL::SSL::SSLError, Timeout::Error. Should be a non-negative integer number. Zero means no retries. The default value is 1.