probably incorrectly delete support for non-standardized matrix srv record
This commit is contained in:
parent
1c8ca527db
commit
78c2a07524
1 changed files with 17 additions and 20 deletions
|
@ -306,14 +306,12 @@ impl super::Service {
|
|||
|
||||
#[tracing::instrument(name = "srv", level = "debug", skip(self))]
|
||||
async fn query_srv_record(&self, hostname: &'_ str) -> Result<Option<FedDest>> {
|
||||
let hostnames =
|
||||
[format!("_matrix-fed._tcp.{hostname}."), format!("_matrix._tcp.{hostname}.")];
|
||||
|
||||
for hostname in hostnames {
|
||||
self.services.server.check_running()?;
|
||||
|
||||
debug!("querying SRV for {hostname:?}");
|
||||
let hostname = hostname.trim_end_matches('.');
|
||||
|
||||
let hostname_suffix = format!("_matrix-fed._tcp.{hostname}.");
|
||||
let hostname = hostname_suffix.trim_end_matches('.');
|
||||
match self.resolver.resolver.srv_lookup(hostname).await {
|
||||
| Err(e) => Self::handle_resolve_error(&e, hostname)?,
|
||||
| Ok(result) => {
|
||||
|
@ -328,7 +326,6 @@ impl super::Service {
|
|||
}));
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Ok(None)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue