From af6aad4e9c612c144b5304fbf68b666ce32ace05 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 8bc677cf..466ef0e7 100644 --- a/piker/data/_sampling.py +++ b/piker/data/_sampling.py @@ -168,7 +168,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