diff options
author | Mark Haines <mark.haines@matrix.org> | 2016-12-29 17:33:46 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2016-12-29 17:33:46 +0000 |
commit | 342fb8dae939dab20948971f0409065de5d8f25b (patch) | |
tree | c2d2b4af97e09c71844aea473f32846d25d384fa /synapse/http/matrixfederationclient.py | |
parent | Fix another comment typo (diff) | |
parent | Bump changelog and version (diff) | |
download | synapse-342fb8dae939dab20948971f0409065de5d8f25b.tar.xz |
Merge branch 'release-v0.18.6' into develop
Diffstat (limited to 'synapse/http/matrixfederationclient.py')
-rw-r--r-- | synapse/http/matrixfederationclient.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/http/matrixfederationclient.py b/synapse/http/matrixfederationclient.py index d5970c05a8..78b92cef36 100644 --- a/synapse/http/matrixfederationclient.py +++ b/synapse/http/matrixfederationclient.py @@ -88,7 +88,8 @@ class MatrixFederationHttpClient(object): self.signing_key = hs.config.signing_key[0] self.server_name = hs.hostname pool = HTTPConnectionPool(reactor) - pool.maxPersistentPerHost = 10 + pool.maxPersistentPerHost = 5 + pool.cachedConnectionTimeout = 2 * 60 self.agent = Agent.usingEndpointFactory( reactor, MatrixFederationEndpointFactory(hs), pool=pool ) @@ -299,7 +300,7 @@ class MatrixFederationHttpClient(object): defer.returnValue(json.loads(body)) @defer.inlineCallbacks - def post_json(self, destination, path, data={}, long_retries=True, + def post_json(self, destination, path, data={}, long_retries=False, timeout=None): """ Sends the specifed json data using POST @@ -332,7 +333,7 @@ class MatrixFederationHttpClient(object): path.encode("ascii"), body_callback=body_callback, headers_dict={"Content-Type": ["application/json"]}, - long_retries=True, + long_retries=long_retries, timeout=timeout, ) |