diff options
author | Erik Johnston <erik@matrix.org> | 2015-05-28 15:34:00 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-05-28 15:43:21 +0100 |
commit | 291e942332e06cf1aa14f2e608dee0e50deed8ff (patch) | |
tree | add9b484846aa8fa6f87d4015a96cc69b8e40ba6 /synapse/http/matrixfederationclient.py | |
parent | Registration should be disabled by default (diff) | |
download | synapse-291e942332e06cf1aa14f2e608dee0e50deed8ff.tar.xz |
Use connection pool for federation connections
Diffstat (limited to '')
-rw-r--r-- | synapse/http/matrixfederationclient.py | 5 |
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 |