This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -513,9 +513,10 @@ async def _ctx_manager() -> AsyncIterator[None]:
513
513
try :
514
514
# Wait for the latest writer to finish.
515
515
# May raise a `CancelledError` if the `Deferred` wrapping us is
516
- # cancelled.
516
+ # cancelled. The `Deferred` we are waiting on must not be cancelled,
517
+ # since we do not own it.
517
518
if curr_writer :
518
- await make_deferred_yieldable (curr_writer )
519
+ await make_deferred_yieldable (stop_cancellation ( curr_writer ) )
519
520
yield
520
521
finally :
521
522
with PreserveLoggingContext ():
@@ -546,8 +547,9 @@ async def _ctx_manager() -> AsyncIterator[None]:
546
547
try :
547
548
# Wait for all current readers and the latest writer to finish.
548
549
# May raise a `CancelledError` if the `Deferred` wrapping us is
549
- # cancelled.
550
- await make_deferred_yieldable (to_wait_on_defer )
550
+ # cancelled. The `Deferred`s we are waiting on must not be cancelled,
551
+ # since we do not own them.
552
+ await make_deferred_yieldable (stop_cancellation (to_wait_on_defer ))
551
553
yield
552
554
finally :
553
555
You can’t perform that action at this time.
0 commit comments