diff --git a/src/service/globals/mod.rs b/src/service/globals/mod.rs index 7e1ccb5e..27be1516 100644 --- a/src/service/globals/mod.rs +++ b/src/service/globals/mod.rs @@ -14,7 +14,6 @@ use std::{ use conduit::{error, trace, utils::MutexMap, Config, Result, Server}; use data::Data; use database::Database; -use hickory_resolver::TokioAsyncResolver; use ipaddress::IPAddress; use regex::RegexSet; use ruma::{ @@ -194,8 +193,6 @@ impl Service { pub fn query_trusted_key_servers_first(&self) -> bool { self.config.query_trusted_key_servers_first } - pub fn dns_resolver(&self) -> &TokioAsyncResolver { &self.resolver.resolver } - pub fn jwt_decoding_key(&self) -> Option<&jsonwebtoken::DecodingKey> { self.jwt_decoding_key.as_ref() } pub fn turn_password(&self) -> &String { &self.config.turn_password } diff --git a/src/service/sending/resolve.rs b/src/service/sending/resolve.rs index 294ac09f..51e7a92f 100644 --- a/src/service/sending/resolve.rs +++ b/src/service/sending/resolve.rs @@ -261,7 +261,8 @@ async fn conditional_query_and_cache_override(overname: &str, hostname: &str, po async fn query_and_cache_override(overname: &'_ str, hostname: &'_ str, port: u16) -> Result<()> { match services() .globals - .dns_resolver() + .resolver + .resolver .lookup_ip(hostname.to_owned()) .await { @@ -299,7 +300,8 @@ async fn query_srv_record(hostname: &'_ str) -> Result> { let hostname = hostname.trim_end_matches('.'); services() .globals - .dns_resolver() + .resolver + .resolver .srv_lookup(hostname.to_owned()) .await }