summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-05-28 15:34:00 +0100
committerErik Johnston <erik@matrix.org>2015-05-28 15:43:21 +0100
commit291e942332e06cf1aa14f2e608dee0e50deed8ff (patch)
treeadd9b484846aa8fa6f87d4015a96cc69b8e40ba6 /synapse
parentRegistration should be disabled by default (diff)
downloadsynapse-291e942332e06cf1aa14f2e608dee0e50deed8ff.tar.xz
Use connection pool for federation connections
Diffstat (limited to 'synapse')
-rw-r--r--synapse/http/matrixfederationclient.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/http/matrixfederationclient.py b/synapse/http/matrixfederationclient.py
index 6f976d5ce8..9b6ba2d548 100644
--- a/synapse/http/matrixfederationclient.py
+++ b/synapse/http/matrixfederationclient.py
@@ -16,7 +16,7 @@
 
 from twisted.internet import defer, reactor, protocol
 from twisted.internet.error import DNSLookupError
-from twisted.web.client import readBody, _AgentBase, _URI
+from twisted.web.client import readBody, _AgentBase, _URI, HTTPConnectionPool
 from twisted.web.http_headers import Headers
 from twisted.web._newclient import ResponseDone
 
@@ -103,7 +103,8 @@ class MatrixFederationHttpClient(object):
         self.hs = hs
         self.signing_key = hs.config.signing_key[0]
         self.server_name = hs.hostname
-        self.agent = MatrixFederationHttpAgent(reactor)
+        pool = HTTPConnectionPool(reactor)
+        self.agent = MatrixFederationHttpAgent(reactor, pool)
         self.clock = hs.get_clock()
         self.version_string = hs.version_string