diff options
author | Sean Quah <seanq@element.io> | 2022-05-06 20:17:20 +0100 |
---|---|---|
committer | Sean Quah <seanq@element.io> | 2022-05-06 20:54:30 +0100 |
commit | 3f8a59f8a49d8fc2aab910803811edec751a9a84 (patch) | |
tree | c366d3e382749f340ba327232c0284de6b449c7b | |
parent | Add newsfile (diff) | |
download | synapse-3f8a59f8a49d8fc2aab910803811edec751a9a84.tar.xz |
Don't trash the logging context when cancelling request processing
Signed-off-by: Sean Quah <seanq@element.io>
-rw-r--r-- | synapse/http/site.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/http/site.py b/synapse/http/site.py index ff77fd016e..1c5651fc82 100644 --- a/synapse/http/site.py +++ b/synapse/http/site.py @@ -372,7 +372,8 @@ class SynapseRequest(Request): # that it will finish up sooner than it normally would. # The `self.processing()` context manager will call # `_finished_processing()` when done. - self.render_deferred.cancel() + with PreserveLoggingContext(): + self.render_deferred.cancel() else: logger.error( "Connection from client lost, but have no Deferred to " |