Ensure paperboi is shield killed on teardown

ems_to_bidir_streaming
Tyler Goodlet 2021-06-08 15:56:34 -04:00
parent db92683ede
commit 47e7baa0c9
1 changed files with 7 additions and 1 deletions

View File

@ -460,4 +460,10 @@ async def open_paperboi(
loglevel=loglevel, loglevel=loglevel,
) as (ctx, first): ) as (ctx, first):
try:
yield ctx, first yield ctx, first
finally:
# be sure to tear down the paper service on exit
with trio.CancelScope(shield=True):
await portal.cancel_actor()