0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-11-16 15:01:23 +01:00
This commit is contained in:
Erik Johnston 2016-12-29 00:09:33 +00:00
parent 5b6672c66d
commit b7336ff32d
2 changed files with 4 additions and 7 deletions

View file

@ -14,7 +14,7 @@
# limitations under the License. # limitations under the License.
from twisted.internet.endpoints import SSL4ClientEndpoint, TCP4ClientEndpoint from twisted.internet.endpoints import SSL4ClientEndpoint, TCP4ClientEndpoint
from twisted.internet import defer, reactor, task from twisted.internet import defer, reactor
from twisted.internet.error import ConnectError from twisted.internet.error import ConnectError
from twisted.names import client, dns from twisted.names import client, dns
from twisted.names.error import DNSNameError, DomainError from twisted.names.error import DNSNameError, DomainError
@ -72,7 +72,9 @@ def matrix_federation_endpoint(reactor, destination, ssl_context_factory=None,
endpoint_kw_args=endpoint_kw_args endpoint_kw_args=endpoint_kw_args
)) ))
else: else:
return _WrappingEndointFac(transport_endpoint(reactor, domain, port, **endpoint_kw_args)) return _WrappingEndointFac(transport_endpoint(
reactor, domain, port, **endpoint_kw_args
))
class _WrappingEndointFac(object): class _WrappingEndointFac(object):

View file

@ -61,11 +61,6 @@ MAX_LONG_RETRIES = 10
MAX_SHORT_RETRIES = 3 MAX_SHORT_RETRIES = 3
def test(conn):
conn.loseConnection()
return conn
class MatrixFederationEndpointFactory(object): class MatrixFederationEndpointFactory(object):
def __init__(self, hs): def __init__(self, hs):
self.tls_server_context_factory = hs.tls_server_context_factory self.tls_server_context_factory = hs.tls_server_context_factory