lib/httpx/resolver/https.rb in httpx-0.24.4 vs lib/httpx/resolver/https.rb in httpx-0.24.5

- old
+ new

@@ -130,11 +130,11 @@ def parse(request, response) code, result = decode_response_body(response) case code when :ok - parse_addresses(result) + parse_addresses(result, request) when :no_domain_found # Indicates no such domain was found. host = @requests.delete(request) connection = reset_hostname(host) @@ -144,16 +144,16 @@ host = @requests.delete(request) connection = reset_hostname(host) emit_resolve_error(connection) when :decode_error - host, connection = @queries.first - reset_hostname(host) + host = @requests.delete(request) + connection = reset_hostname(host) emit_resolve_error(connection, connection.origin.host, result) end end - def parse_addresses(answers) + def parse_addresses(answers, request) if answers.empty? # no address found, eliminate candidates host = @requests.delete(request) connection = reset_hostname(host) emit_resolve_error(connection)