End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Resolv::DNS#timeouts=
timeouts=(values)
lib/resolv.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/lib/resolv.rb, line 346
def timeouts=(values)
@config.timeouts = values
end
Sets the resolver timeouts. This may be a single positive number or an array of positive numbers representing timeouts in seconds. If an array is specified, a DNS request will retry and wait for each successive interval in the array until a successful response is received. Specifying nil reverts to the default timeouts:
- 5, second = 5 * 2 / nameserver_count, 2 * second, 4 * second
-
Example:
Exampledns.timeouts = 3