remove unnecessary wrapper

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-07-03 20:19:20 +00:00
parent 0cea64309a
commit f104ced55d
2 changed files with 4 additions and 5 deletions

View file

@ -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 }

View file

@ -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<Option<FedDest>> {
let hostname = hostname.trim_end_matches('.');
services()
.globals
.dns_resolver()
.resolver
.resolver
.srv_lookup(hostname.to_owned())
.await
}