0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-06-30 16:38:21 +02:00

Merge pull request #2711 from matrix-org/rav/fix_dns_errhandler

Fix error handling on dns lookup
This commit is contained in:
Richard van der Hoff 2017-11-27 12:19:18 +00:00 committed by GitHub
commit df6c72ede3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -362,8 +362,10 @@ def _get_hosts_for_srv_record(dns_client, host):
return res
# no logcontexts here, so we can safely fire these off and gatherResults
d1 = dns_client.lookupAddress(host).addCallbacks(cb, eb)
d2 = dns_client.lookupIPV6Address(host).addCallbacks(cb, eb)
d1 = dns_client.lookupAddress(host).addCallbacks(
cb, eb, errbackArgs=("A", ))
d2 = dns_client.lookupIPV6Address(host).addCallbacks(
cb, eb, errbackArgs=("AAAA", ))
results = yield defer.DeferredList(
[d1, d2], consumeErrors=True)