More tolerance for "stream-ended-early" conditions in quote throttler

l1_precision_fix
Tyler Goodlet 2022-04-27 17:17:04 -04:00
parent 2f04a8c939
commit 0061fabb56
1 changed files with 6 additions and 1 deletions

View File

@ -380,7 +380,12 @@ async def uniform_rate_send(
if left_to_sleep > 0: if left_to_sleep > 0:
with trio.move_on_after(left_to_sleep) as cs: 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 diff = time.time() - last_send
if not first_quote: if not first_quote: