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:
|
except tractor.RemoteActorError as rme:
|
||||||
if rme.type is not tractor._exceptions.StreamOverrun:
|
if rme.type is not tractor._exceptions.StreamOverrun:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
ctx = stream._ctx
|
ctx = stream._ctx
|
||||||
chan = ctx.chan
|
chan = ctx.chan
|
||||||
log.warning(
|
log.warning(
|
||||||
|
@ -892,6 +893,7 @@ async def uniform_rate_send(
|
||||||
trio.ClosedResourceError,
|
trio.ClosedResourceError,
|
||||||
trio.BrokenResourceError,
|
trio.BrokenResourceError,
|
||||||
ConnectionResetError,
|
ConnectionResetError,
|
||||||
|
trio.EndOfChannel,
|
||||||
):
|
):
|
||||||
# if the feed consumer goes down then drop
|
# if the feed consumer goes down then drop
|
||||||
# out of this rate limiter
|
# out of this rate limiter
|
||||||
|
|
Loading…
Reference in New Issue