Make retrying requests on DNS failures configurable, and turn off retrying only in directory.get_association

This commit is contained in:
Kegan Dougal 2014-09-03 14:26:35 +01:00
parent c06d07a276
commit 7fc84c7019
3 changed files with 29 additions and 8 deletions

View file

@ -18,6 +18,7 @@ from twisted.internet import defer
from ._base import BaseHandler
from synapse.api.errors import SynapseError
from synapse.http.client import HttpClient
import logging
@ -68,7 +69,10 @@ class DirectoryHandler(BaseHandler):
result = yield self.federation.make_query(
destination=room_alias.domain,
query_type="directory",
args={"room_alias": room_alias.to_string()},
args={
"room_alias": room_alias.to_string(),
HttpClient.RETRY_DNS_LOOKUP_FAILURES: False
}
)
if result and "room_id" in result and "servers" in result: