summary refs log tree commit diff
path: root/synapse/http/site.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2020-05-21 15:19:00 +0100
committerErik Johnston <erik@matrix.org>2020-05-21 15:19:00 +0100
commitcf92310da26f9b6e03e98055e55c7e9767225742 (patch)
tree832140c94907ed381004d01f859abbf2fa86dd3b /synapse/http/site.py
parentMerge branch 'rav/matrix_hacks' into matrix-org-hotfixes (diff)
parentStub out GET presence requests in the frontend proxy (#7545) (diff)
downloadsynapse-cf92310da26f9b6e03e98055e55c7e9767225742.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
Diffstat (limited to 'synapse/http/site.py')
-rw-r--r--synapse/http/site.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/http/site.py b/synapse/http/site.py

index 32feb0d968..514f2f1402 100644 --- a/synapse/http/site.py +++ b/synapse/http/site.py
@@ -15,6 +15,7 @@ import contextlib import logging import time +from twisted.python.failure import Failure from twisted.web.server import Request, Site from synapse.http import redact_uri @@ -190,6 +191,12 @@ class SynapseRequest(Request): Overrides twisted.web.server.Request.connectionLost to record the finish time and do logging. """ + # There is a bug in Twisted where reason is not wrapped in a Failure object + # Detect this and wrap it manually as a workaround + # More information: https://github.com/matrix-org/synapse/issues/7441 + if not isinstance(reason, Failure): + reason = Failure(reason) + self.finish_time = time.time() Request.connectionLost(self, reason)