From 04c12a756c827afdf2eeaf6dabeb5b2c06b7305d Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 22 Apr 2022 14:06:48 -0400 Subject: [PATCH] If a sample stream is already ded, just warn --- 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 b5a75a67..2098d593 100644 --- a/piker/data/_sampling.py +++ b/piker/data/_sampling.py @@ -160,7 +160,12 @@ async def broadcast( log.error( f'{stream._ctx.chan.uid} dropped connection' ) - subs.remove(stream) + try: + subs.remove(stream) + except ValueError: + log.warning( + f'{stream._ctx.chan.uid} sub already removed!?' + ) @tractor.context