From 0061fabb561f726f3bb562ed7c00f22f8a653115 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 27 Apr 2022 17:17:04 -0400 Subject: [PATCH] More tolerance for "stream-ended-early" conditions in quote throttler --- 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 bdc7b4d0..b5a75a67 100644 --- a/piker/data/_sampling.py +++ b/piker/data/_sampling.py @@ -380,7 +380,12 @@ async def uniform_rate_send( if left_to_sleep > 0: with trio.move_on_after(left_to_sleep) as cs: - sym, last_quote = await quote_stream.receive() + try: + sym, last_quote = await quote_stream.receive() + except trio.EndOfChannel: + log.exception(f"feed for {stream} ended?") + break + diff = time.time() - last_send if not first_quote: