- Sep 29, 2020
-
-
Richard van der Hoff authored
* Remove `on_timeout_cancel` from `timeout_deferred` The `on_timeout_cancel` param to `timeout_deferred` wasn't always called on a timeout (in particular if the canceller raised an exception), so it was unreliable. It was also only used in one place, and to be honest it's easier to do what it does a different way. * Fix handling of connection timeouts in outgoing http requests Turns out that if we get a timeout during connection, then a different exception is raised, which wasn't always handled correctly. To fix it, catch the exception in SimpleHttpClient and turn it into a RequestTimedOutError (which is already a documented exception). Also add a description to RequestTimedOutError so that we can see which stage it failed at. * Fix incorrect handling of timeouts reading federation responses This was trapping the wrong sort of TimeoutError, so was never being hit. The effect was relatively minor, but we should fix this so that it does the expected thing. * Fix inconsistent handling of `timeout` param between methods `get_json`, `put_json` and `delete_json` were applying a different timeout to the response body to `post_json`; bring them in line and test. Co-authored-by:
Patrick Cloke <clokep@users.noreply.github.com> Co-authored-by:
Erik Johnston <erik@matrix.org>
-
- Sep 10, 2020
-
-
Patrick Cloke authored
-
- Aug 27, 2020
-
-
Andrew Morgan authored
-
- Jul 30, 2020
-
-
Patrick Cloke authored
-
- Mar 24, 2020
-
-
Richard van der Hoff authored
* Pull Sentinel out of LoggingContext ... and drop a few unnecessary references to it * Factor out LoggingContext.current_context move `current_context` and `set_context` out to top-level functions. Mostly this means that I can more easily trace what's actually referring to LoggingContext, but I think it's generally neater. * move copy-to-parent into `stop` this really just makes `start` and `stop` more symetric. It also means that it behaves correctly if you manually `set_log_context` rather than using the context manager. * Replace `LoggingContext.alive` with `finished` Turn `alive` into `finished` and make it a bit better defined.
-
- Jul 23, 2019
-
-
Amber Brown authored
-
- Jul 03, 2019
-
-
Amber Brown authored
-
- Jun 20, 2019
-
-
Amber Brown authored
-
- May 13, 2019
-
-
Andrew Morgan authored
-
- May 10, 2019
-
-
Amber Brown authored
-
- Mar 20, 2019
-
-
Andrew Morgan authored
-
Andrew Morgan authored
-
Andrew Morgan authored
-
Andrew Morgan authored
-
- Mar 18, 2019
-
-
Andrew Morgan authored
-
- Mar 13, 2019
-
-
Andrew Morgan authored
-
Andrew Morgan authored
-
Andrew Morgan authored
-
- Feb 11, 2019
-
-
Richard van der Hoff authored
It's nothing to do with refreshing the certificates. No idea why it was here.
-
- Jan 25, 2019
-
-
Richard van der Hoff authored
Move the Host header logic down here so that (a) it is used if we reuse the agent elsewhere, and (b) we can mess about with it with .well-known.
-
- Jan 22, 2019
-
-
Richard van der Hoff authored
... instead of the matrix_federation_endpoint
-
- Jan 18, 2019
-
-
Richard van der Hoff authored
* 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.
-
- Jan 08, 2019
-
-
Erik Johnston authored
* Correctly retry and back off if we get a HTTPerror response * Refactor request sending to have better excpetions MatrixFederationHttpClient blindly reraised exceptions to the caller without differentiating "expected" failures (e.g. connection timeouts etc) versus more severe problems (e.g. programming errors). This commit adds a RequestSendFailed exception that is raised when "expected" failures happen, allowing the TransactionQueue to log them as warnings while allowing us to log other exceptions as actual exceptions.
-
- Sep 24, 2018
-
-
Oleg Girko authored
Older Twisted (18.4.0) returns TimeoutError instead of ConnectingCancelledError when connection times out. This change allows tests to be compatible with this behaviour. Signed-off-by:
Oleg Girko <ol@infoserver.lv>
-
- Sep 18, 2018
-
-
Richard van der Hoff authored
We want to wait until we have read the response body before we log the request as complete, otherwise a confusing thing happens where the request appears to have completed, but we later fail it. To do this, we factor the salient details of a request out to a separate object, which can then keep track of the txn_id, so that it can be logged.
-
- Sep 13, 2018
-
-
Amber Brown authored
-