Description
NOTICE This project has been rebranded to Hickory DNS and has been moved to the https://github.com/hickory-dns/hickory-dns organization and repo, this crate/binary has been moved to hickory-resolver, from 0.24 and onward.
so I tried to rebuild the tricorder with Hickory
use tokio::runtime::Runtime;
use hickory_resolver::Resolver;
use hickory_resolver::name_server::TokioConnectionProvider;
use hickory_resolver::config::*;
type DnsResolver = Resolver;
pub async fn enumerate(http_client: &Client, target: &str) -> Result<Vec, Error> {
// We need a Tokio Runtime to run the resolver
// this is responsible for running all Future tasks and registering interest in IO channels
//let mut io_loop = Runtime::new().unwrap();
let io_loop = Runtime::new().unwrap();
...
// Construct a new Resolver with default configuration options
let dns_resolver = Resolver::builder_with_config(
ResolverConfig::default(),
TokioConnectionProvider::default()
).build();
it builds fine but when I run it i get an error:
Cannot drop a runtime in a context where blocking is not allowed. This happens when a runtime is dropped from within an asynchronous context.