Gracefully close on EoCs thrown in quote throttler
Since `tractor.MsgStream.send()` now also raises `trio.EndOfChannel` when the stream was gracefully `Stop`ped by the peer side, also handle that case in `.data._sampling.uniform_rate_send()`.decimal_prices_thru_ems
parent
705f0e86ac
commit
3ff0a86741
|
@ -876,6 +876,7 @@ async def uniform_rate_send(
|
|||
except tractor.RemoteActorError as rme:
|
||||
if rme.type is not tractor._exceptions.StreamOverrun:
|
||||
raise
|
||||
|
||||
ctx = stream._ctx
|
||||
chan = ctx.chan
|
||||
log.warning(
|
||||
|
@ -892,6 +893,7 @@ async def uniform_rate_send(
|
|||
trio.ClosedResourceError,
|
||||
trio.BrokenResourceError,
|
||||
ConnectionResetError,
|
||||
trio.EndOfChannel,
|
||||
):
|
||||
# if the feed consumer goes down then drop
|
||||
# out of this rate limiter
|
||||
|
|
Loading…
Reference in New Issue