Don't double request a cancelled actor

zombie_lord_infinite
Tyler Goodlet 2021-10-10 16:46:29 -04:00
parent 8e21bb046e
commit c01d2f8aea
1 changed files with 2 additions and 2 deletions

View File

@ -198,6 +198,7 @@ class ActorNursery:
# one-cancels-all strat
async with trio.open_nursery() as cancel_sender:
for subactor, proc, portal in childs.values():
if proc.poll() is None and not portal.cancel_called:
cancel_sender.start_soon(portal.cancel_actor)
# cancel all spawner tasks
@ -298,7 +299,6 @@ async def _open_and_supervise_one_cancels_all_nursery(
# same as a user code failure.
except BaseException as err:
print('ERROR')
# anursery._join_procs.set()
src_err = err