Skip to content

Commit 95de67d

Browse files
committed
Fix delay_cancellation
1 parent ca1202f commit 95de67d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

synapse/util/async_helpers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,8 @@ def handle_cancel(new_deferred: "defer.Deferred[T]") -> None:
949949
# propagating. we then `unpause` it once the wrapped deferred completes, to
950950
# propagate the exception.
951951
new_deferred.pause()
952-
new_deferred.errback(Failure(CancelledError()))
952+
with PreserveLoggingContext():
953+
new_deferred.errback(Failure(CancelledError()))
953954

954955
deferred.addBoth(lambda _: new_deferred.unpause())
955956

0 commit comments

Comments
 (0)