More tolerance for "stream-ended-early" conditions in quote throttler
parent
e4158dce01
commit
19205d57a1
|
@ -385,7 +385,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:
|
||||||
|
try:
|
||||||
sym, last_quote = await quote_stream.receive()
|
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:
|
||||||
|
|
Loading…
Reference in New Issue