summary refs log tree commit diff
path: root/synapse/http/endpoint.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2017-11-24 16:44:56 +0000
committerRichard van der Hoff <richard@matrix.org>2017-11-24 16:47:48 +0000
commit8b38096a897bc142378d8a1f01fc28c459decc7e (patch)
tree2bbd1fc896f965468cac014c2300a81a188d5a1d /synapse/http/endpoint.py
parentMerge pull request #2701 from matrix-org/rav/one_mediarepo_to_rule_them_all (diff)
downloadsynapse-8b38096a897bc142378d8a1f01fc28c459decc7e.tar.xz
Fix error handling on dns lookup
pass the right arguments to the errback handler

Fixes "TypeError('eb() takes exactly 2 arguments (1 given)',)"
Diffstat (limited to 'synapse/http/endpoint.py')
-rw-r--r--synapse/http/endpoint.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/http/endpoint.py b/synapse/http/endpoint.py

index a97532162f..e2b99ef3bd 100644 --- a/synapse/http/endpoint.py +++ b/synapse/http/endpoint.py
@@ -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)