fix: SRV lookups should end with a period

This commit is contained in:
Timo Kösters 2023-02-23 16:12:58 +01:00
parent cb0ce5b08f
commit 27f29ba699
No known key found for this signature in database
GPG key ID: 0B25E636FBA7E4CB

View file

@ -472,10 +472,11 @@ async fn find_actual_destination(destination: &'_ ServerName) -> (FedDest, FedDe
}
async fn query_srv_record(hostname: &'_ str) -> Option<FedDest> {
let hostname = hostname.trim_end_matches('.');
if let Ok(Some(host_port)) = services()
.globals
.dns_resolver()
.srv_lookup(format!("_matrix._tcp.{hostname}"))
.srv_lookup(format!("_matrix._tcp.{hostname}."))
.await
.map(|srv| {
srv.iter().next().map(|result| {