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
Tyler Goodlet 2025-04-21 21:31:13 -04:00
parent 705f0e86ac
commit 3ff0a86741
1 changed files with 2 additions and 0 deletions

View File

@ -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