lib/httpx/resolver/native.rb in httpx-1.0.2 vs lib/httpx/resolver/native.rb in httpx-1.1.0

- old
+ new

@@ -28,11 +28,11 @@ @socket_type = @resolver_options.fetch(:socket_type, :udp) @nameserver = if (nameserver = @resolver_options[:nameserver]) nameserver = nameserver[family] if nameserver.is_a?(Hash) Array(nameserver) end - @ndots = @resolver_options[:ndots] + @ndots = @resolver_options.fetch(:ndots, 1) @search = Array(@resolver_options[:search]).map { |srch| srch.scan(/[^.]+/) } @_timeouts = Array(@resolver_options[:timeouts]) @timeouts = Hash.new { |timeouts, host| timeouts[host] = @_timeouts.dup } @connections = [] @queries = {} @@ -101,10 +101,10 @@ @start_timeout = Utils.now hosts = @queries.keys @timeouts.values_at(*hosts).reject(&:empty?).map(&:first).min end - def raise_timeout_error(interval) + def handle_socket_timeout(interval) do_retry(interval) end private