mirror of
https://github.com/element-hq/synapse
synced 2024-08-19 05:40:58 +00:00
Merge pull request #2711 from matrix-org/rav/fix_dns_errhandler
Fix error handling on dns lookup
This commit is contained in:
commit
df6c72ede3
1 changed files with 4 additions and 2 deletions
|
@ -362,8 +362,10 @@ def _get_hosts_for_srv_record(dns_client, host):
|
||||||
return res
|
return res
|
||||||
|
|
||||||
# no logcontexts here, so we can safely fire these off and gatherResults
|
# no logcontexts here, so we can safely fire these off and gatherResults
|
||||||
d1 = dns_client.lookupAddress(host).addCallbacks(cb, eb)
|
d1 = dns_client.lookupAddress(host).addCallbacks(
|
||||||
d2 = dns_client.lookupIPV6Address(host).addCallbacks(cb, eb)
|
cb, eb, errbackArgs=("A", ))
|
||||||
|
d2 = dns_client.lookupIPV6Address(host).addCallbacks(
|
||||||
|
cb, eb, errbackArgs=("AAAA", ))
|
||||||
results = yield defer.DeferredList(
|
results = yield defer.DeferredList(
|
||||||
[d1, d2], consumeErrors=True)
|
[d1, d2], consumeErrors=True)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue