mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-26 09:49:26 -05:00
Add debug logging to DNS SRV requests. (#9305)
This commit is contained in:
parent
3f534d3fdf
commit
b0f4119b8b
1
changelog.d/9305.misc
Normal file
1
changelog.d/9305.misc
Normal file
@ -0,0 +1 @@
|
|||||||
|
Add debug logging for SRV lookups. Contributed by @Bubu.
|
@ -323,12 +323,19 @@ class MatrixHostnameEndpoint:
|
|||||||
if port or _is_ip_literal(host):
|
if port or _is_ip_literal(host):
|
||||||
return [Server(host, port or 8448)]
|
return [Server(host, port or 8448)]
|
||||||
|
|
||||||
|
logger.debug("Looking up SRV record for %s", host.decode(errors="replace"))
|
||||||
server_list = await self._srv_resolver.resolve_service(b"_matrix._tcp." + host)
|
server_list = await self._srv_resolver.resolve_service(b"_matrix._tcp." + host)
|
||||||
|
|
||||||
if server_list:
|
if server_list:
|
||||||
|
logger.debug(
|
||||||
|
"Got %s from SRV lookup for %s",
|
||||||
|
", ".join(map(str, server_list)),
|
||||||
|
host.decode(errors="replace"),
|
||||||
|
)
|
||||||
return server_list
|
return server_list
|
||||||
|
|
||||||
# No SRV records, so we fallback to host and 8448
|
# No SRV records, so we fallback to host and 8448
|
||||||
|
logger.debug("No SRV records for %s", host.decode(errors="replace"))
|
||||||
return [Server(host, 8448)]
|
return [Server(host, 8448)]
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user