From 48053588da1b775f31b1770a42c2ee53a8bae08f Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 22 Jun 2021 10:58:52 -0400 Subject: [PATCH] Don't cancel handler nursery, let errors bubble --- piker/ui/_event.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/piker/ui/_event.py b/piker/ui/_event.py index bbb60896..282711ab 100644 --- a/piker/ui/_event.py +++ b/piker/ui/_event.py @@ -117,10 +117,9 @@ async def open_event_stream( source_widget.installEventFilter(kc) try: - yield recv - + async with (send, recv): + yield recv finally: - await send.aclose() source_widget.removeEventFilter(kc) @@ -140,4 +139,3 @@ async def open_handler( ): n.start_soon(async_handler, source_widget, event_recv_stream) yield - n.cancel_scope.cancel()