diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-05-29 13:49:44 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-05-29 13:49:44 +0100 |
commit | 784aaa53dfcd25643088d9347e58b5a746f71f21 (patch) | |
tree | d1209dc7994aaa650fc2a4765eb501c0fbfb66d7 /synapse/http/client.py | |
parent | Add config for setting the recaptcha verify api endpoint, so we can test it i... (diff) | |
parent | SYN-395: Fix CAPTCHA, don't double decode json (diff) | |
download | synapse-784aaa53dfcd25643088d9347e58b5a746f71f21.tar.xz |
Merge branch 'develop' into markjh/SYT-8-recaptcha
Conflicts: synapse/handlers/auth.py
Diffstat (limited to 'synapse/http/client.py')
-rw-r--r-- | synapse/http/client.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/http/client.py b/synapse/http/client.py index 5b3cefb2dc..e746f2416e 100644 --- a/synapse/http/client.py +++ b/synapse/http/client.py @@ -20,7 +20,8 @@ import synapse.metrics from twisted.internet import defer, reactor from twisted.web.client import ( - Agent, readBody, FileBodyProducer, PartialDownloadError + Agent, readBody, FileBodyProducer, PartialDownloadError, + HTTPConnectionPool, ) from twisted.web.http_headers import Headers @@ -55,7 +56,9 @@ class SimpleHttpClient(object): # The default context factory in Twisted 14.0.0 (which we require) is # BrowserLikePolicyForHTTPS which will do regular cert validation # 'like a browser' - self.agent = Agent(reactor) + pool = HTTPConnectionPool(reactor) + pool.maxPersistentPerHost = 10 + self.agent = Agent(reactor, pool=pool) self.version_string = hs.version_string def request(self, method, *args, **kwargs): |