remove resolver wrapper; use std mutex
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
@@ -47,9 +47,10 @@ pub(crate) async fn get_actual_dest(server_name: &ServerName) -> Result<ActualDe
|
||||
let cached;
|
||||
let cached_result = services()
|
||||
.globals
|
||||
.actual_destinations()
|
||||
.resolver
|
||||
.destinations
|
||||
.read()
|
||||
.await
|
||||
.expect("locked for reading")
|
||||
.get(server_name)
|
||||
.cloned();
|
||||
|
||||
|
||||
@@ -105,9 +105,10 @@ where
|
||||
if response.is_ok() && !actual.cached {
|
||||
services()
|
||||
.globals
|
||||
.actual_destinations()
|
||||
.resolver
|
||||
.destinations
|
||||
.write()
|
||||
.await
|
||||
.expect("locked for writing")
|
||||
.insert(OwnedServerName::from(dest), (actual.dest.clone(), actual.host.clone()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user