1
0

Don't trash the logging context when cancelling request processing

Signed-off-by: Sean Quah <seanq@element.io>
This commit is contained in:
Sean Quah
2022-05-06 20:17:20 +01:00
parent a89fc72fba
commit 3f8a59f8a4

View File

@@ -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 "