feat: implement appservices
this also reverts some stateres changes
This commit is contained in:
parent
d62f17a91a
commit
6e5b35ea92
26 changed files with 696 additions and 584 deletions
|
@ -1,10 +1,10 @@
|
|||
use crate::{database::Config, utils, Error, Result};
|
||||
use trust_dns_resolver::TokioAsyncResolver;
|
||||
use std::collections::HashMap;
|
||||
use log::error;
|
||||
use ruma::ServerName;
|
||||
use std::collections::HashMap;
|
||||
use std::sync::Arc;
|
||||
use std::sync::RwLock;
|
||||
use trust_dns_resolver::TokioAsyncResolver;
|
||||
|
||||
pub const COUNTER: &str = "c";
|
||||
|
||||
|
@ -59,9 +59,11 @@ impl Globals {
|
|||
config,
|
||||
keypair: Arc::new(keypair),
|
||||
reqwest_client: reqwest::Client::new(),
|
||||
dns_resolver: TokioAsyncResolver::tokio_from_system_conf().await.map_err(|_| {
|
||||
Error::bad_config("Failed to set up trust dns resolver with system config.")
|
||||
})?,
|
||||
dns_resolver: TokioAsyncResolver::tokio_from_system_conf()
|
||||
.await
|
||||
.map_err(|_| {
|
||||
Error::bad_config("Failed to set up trust dns resolver with system config.")
|
||||
})?,
|
||||
actual_destination_cache: Arc::new(RwLock::new(HashMap::new())),
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue