From 02e0c0e1a468aaf29c57fa893e683e1a3cbedaeb Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sat, 16 Feb 2019 14:05:24 -0500 Subject: [PATCH] `trio.ClosedResourceError is deprecated --- tractor/msg.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tractor/msg.py b/tractor/msg.py index ebed198..73e39d5 100644 --- a/tractor/msg.py +++ b/tractor/msg.py @@ -43,6 +43,9 @@ async def fan_out_to_ctxs( for ctx in topics2ctxs.get(topic, set()): ctx_payloads.setdefault(ctx, {}).update(packet), + if not ctx_payloads: + log.debug(f"Unconsumed values:\n{published}") + # deliver to each subscriber (fan out) if ctx_payloads: for ctx, payload in ctx_payloads.items(): @@ -50,7 +53,7 @@ async def fan_out_to_ctxs( await ctx.send_yield(payload) except ( # That's right, anything you can think of... - trio.ClosedStreamError, ConnectionResetError, + trio.ClosedResourceError, ConnectionResetError, ConnectionRefusedError, ): log.warning(f"{ctx.chan} went down?")