summary refs log tree commit diff
path: root/synapse/http
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-12-29 00:09:33 +0000
committerErik Johnston <erik@matrix.org>2016-12-29 00:09:33 +0000
commitb7336ff32d4f9883c06c538901f6566b7ccb1ebe (patch)
tree0361101a518578159e53864af7822fdc85e7c2ca /synapse/http
parentWrap connections in an N minute timeout to ensure they get reaped correctly (diff)
downloadsynapse-b7336ff32d4f9883c06c538901f6566b7ccb1ebe.tar.xz
Clean up
Diffstat (limited to '')
-rw-r--r--synapse/http/endpoint.py6
-rw-r--r--synapse/http/matrixfederationclient.py5
2 files changed, 4 insertions, 7 deletions
diff --git a/synapse/http/endpoint.py b/synapse/http/endpoint.py
index 16ad09a481..4d361bbe73 100644
--- a/synapse/http/endpoint.py
+++ b/synapse/http/endpoint.py
@@ -14,7 +14,7 @@
 # limitations under the License.
 
 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.names import client, dns
 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
         ))
     else:
-        return _WrappingEndointFac(transport_endpoint(reactor, domain, port, **endpoint_kw_args))
+        return _WrappingEndointFac(transport_endpoint(
+            reactor, domain, port, **endpoint_kw_args
+        ))
 
 
 class _WrappingEndointFac(object):
diff --git a/synapse/http/matrixfederationclient.py b/synapse/http/matrixfederationclient.py
index da98d2d666..4d40219fcc 100644
--- a/synapse/http/matrixfederationclient.py
+++ b/synapse/http/matrixfederationclient.py
@@ -61,11 +61,6 @@ MAX_LONG_RETRIES = 10
 MAX_SHORT_RETRIES = 3
 
 
-def test(conn):
-    conn.loseConnection()
-    return conn
-
-
 class MatrixFederationEndpointFactory(object):
     def __init__(self, hs):
         self.tls_server_context_factory = hs.tls_server_context_factory