mirror of
https://gitlab.com/famedly/conduit.git
synced 2024-11-17 13:10:50 +01:00
fix: SRV lookups should end with a period
This commit is contained in:
parent
cb0ce5b08f
commit
27f29ba699
1 changed files with 2 additions and 1 deletions
|
@ -472,10 +472,11 @@ async fn find_actual_destination(destination: &'_ ServerName) -> (FedDest, FedDe
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn query_srv_record(hostname: &'_ str) -> Option<FedDest> {
|
async fn query_srv_record(hostname: &'_ str) -> Option<FedDest> {
|
||||||
|
let hostname = hostname.trim_end_matches('.');
|
||||||
if let Ok(Some(host_port)) = services()
|
if let Ok(Some(host_port)) = services()
|
||||||
.globals
|
.globals
|
||||||
.dns_resolver()
|
.dns_resolver()
|
||||||
.srv_lookup(format!("_matrix._tcp.{hostname}"))
|
.srv_lookup(format!("_matrix._tcp.{hostname}."))
|
||||||
.await
|
.await
|
||||||
.map(|srv| {
|
.map(|srv| {
|
||||||
srv.iter().next().map(|result| {
|
srv.iter().next().map(|result| {
|
||||||
|
|
Loading…
Reference in a new issue