lib/httpx/resolver/native.rb in httpx-0.20.5 vs lib/httpx/resolver/native.rb in httpx-0.21.0

- old
+ new

@@ -75,10 +75,11 @@ consume end nil rescue Errno::EHOSTUNREACH => e @ns_index += 1 - if @ns_index < @nameserver.size + nameserver = @nameserver + if nameserver && @ns_index < nameserver.size log { "resolver: failed resolving on nameserver #{@nameserver[@ns_index - 1]} (#{e.message})" } transition(:idle) else handle_error(e) end