From 1e683a4b910ea1d31f062088e25d10e5a861c272 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 6 Jun 2023 13:13:26 -0400 Subject: [PATCH] Another guard around sampling subscriber popped race.. --- piker/data/_sampling.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/piker/data/_sampling.py b/piker/data/_sampling.py index af8216c3..a8dba30b 100644 --- a/piker/data/_sampling.py +++ b/piker/data/_sampling.py @@ -366,7 +366,12 @@ async def register_with_sampler( sub_for_broadcasts and subs ): - subs.remove(stream) + try: + subs.remove(stream) + except KeyError: + log.warning( + f'{stream._ctx.chan.uid} sub already removed!?' + ) else: # if no shms are passed in we just wait until cancelled # by caller.