Skip to content

Commit 8c81bbd

Browse files
committed
Fix failing test
1 parent 701e0b9 commit 8c81bbd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

trio_asyncio/_loop.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,10 @@ async def async_main(*args):
417417

418418
@sync_nursery.start_soon
419419
async def wait_for_sync():
420-
await loop.synchronize()
420+
try:
421+
await loop.synchronize()
422+
except RuntimeError: # "Event loop is closed"
423+
pass
421424
sync_nursery.cancel_scope.cancel()
422425

423426
await loop.wait_stopped()

0 commit comments

Comments
 (0)