lib/httpx/resolver/https.rb in httpx-0.6.4 vs lib/httpx/resolver/https.rb in httpx-0.6.5

- old
+ new

@@ -119,18 +119,20 @@ begin answers = decode_response_body(response) rescue Resolv::DNS::DecodeError, JSON::JSONError => e host, connection = @queries.first if @_record_types[host].empty? + @queries.delete(host) emit_resolve_error(connection, host, e) return end end if answers.empty? host, connection = @queries.first @_record_types[host].shift if @_record_types[host].empty? + @queries.delete(host) @_record_types.delete(host) emit_resolve_error(connection, host) return end else @@ -156,10 +158,10 @@ hostname = hostname[0..-2] if hostname.end_with?(".") connection = @queries.delete(hostname) next unless connection # probably a retried query for which there's an answer @connections.delete(connection) - Resolver.cached_lookup_set(hostname, addresses) + Resolver.cached_lookup_set(hostname, addresses) if @resolver_options.cache emit_addresses(connection, addresses.map { |addr| addr["data"] }) end end return if @connections.empty?