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]:
513513 try :
514514 # Wait for the latest writer to finish.
515515 # 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.
517518 if curr_writer :
518- await make_deferred_yieldable (curr_writer )
519+ await make_deferred_yieldable (stop_cancellation ( curr_writer ) )
519520 yield
520521 finally :
521522 with PreserveLoggingContext ():
@@ -546,8 +547,9 @@ async def _ctx_manager() -> AsyncIterator[None]:
546547 try :
547548 # Wait for all current readers and the latest writer to finish.
548549 # 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 ))
551553 yield
552554 finally :
553555
You can’t perform that action at this time.
0 commit comments