diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2019-01-18 12:07:38 +0000 |
---|---|---|
committer | Amber Brown <hawkowl@atleastfornow.net> | 2019-01-18 23:07:38 +1100 |
commit | de6888e7ce7ec58e8b7935e35bb6572504cae873 (patch) | |
tree | dc4918a9fb5c347a808f9c1be263824693f55162 /synapse/http/matrixfederationclient.py | |
parent | Fix incorrect logcontexts after a Deferred was cancelled (#4407) (diff) | |
download | synapse-de6888e7ce7ec58e8b7935e35bb6572504cae873.tar.xz |
Remove redundant WrappedConnection (#4409)
* Remove redundant WrappedConnection The matrix federation client uses an HTTP connection pool, which times out its idle HTTP connections, so there is no need for any of this business.
Diffstat (limited to 'synapse/http/matrixfederationclient.py')
-rw-r--r-- | synapse/http/matrixfederationclient.py | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/synapse/http/matrixfederationclient.py b/synapse/http/matrixfederationclient.py index ea2fc64b99..250bb1ef91 100644 --- a/synapse/http/matrixfederationclient.py +++ b/synapse/http/matrixfederationclient.py @@ -321,23 +321,23 @@ class MatrixFederationHttpClient(object): url_str, ) - # we don't want all the fancy cookie and redirect handling that - # treq.request gives: just use the raw Agent. - request_deferred = self.agent.request( - method_bytes, - url_bytes, - headers=Headers(headers_dict), - bodyProducer=producer, - ) - - request_deferred = timeout_deferred( - request_deferred, - timeout=_sec_timeout, - reactor=self.hs.get_reactor(), - ) - try: with Measure(self.clock, "outbound_request"): + # we don't want all the fancy cookie and redirect handling + # that treq.request gives: just use the raw Agent. + request_deferred = self.agent.request( + method_bytes, + url_bytes, + headers=Headers(headers_dict), + bodyProducer=producer, + ) + + request_deferred = timeout_deferred( + request_deferred, + timeout=_sec_timeout, + reactor=self.hs.get_reactor(), + ) + response = yield make_deferred_yieldable( request_deferred, ) |