lib/httpx/resolver/native.rb in httpx-0.23.0 vs lib/httpx/resolver/native.rb in httpx-0.23.1

- old
+ new

@@ -242,13 +242,17 @@ when :ok parse_addresses(result) when :no_domain_found # Indicates no such domain was found. hostname, connection = @queries.first - reset_hostname(hostname) + reset_hostname(hostname, reset_candidates: false) - @connections.delete(connection) - raise NativeResolveError.new(connection, connection.origin.host, "name or service not known (#{hostname})") + unless @queries.value?(connection) + @connections.delete(connection) + raise NativeResolveError.new(connection, connection.origin.host, "name or service not known") + end + + resolve when :message_truncated # TODO: what to do if it's already tcp?? return if @socket_type == :tcp @socket_type = :tcp