From bd14cbe0828214bcc4248b2dcec621e4c3806cbb Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sat, 4 Aug 2018 17:59:10 -0400 Subject: [PATCH] Port to trio's new resource error --- tractor/_actor.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tractor/_actor.py b/tractor/_actor.py index fe38929..1aa7efd 100644 --- a/tractor/_actor.py +++ b/tractor/_actor.py @@ -189,8 +189,7 @@ class Actor: self, stream: trio.SocketStream, ): - """ - Entry point for new inbound connections to the channel server. + """Entry point for new inbound connections to the channel server. """ self._no_more_peers.clear() chan = Channel(stream=stream) @@ -456,7 +455,7 @@ class Actor: try: await self._parent_chan.send( {'error': traceback.format_exc(), 'cid': 'internal'}) - except trio.ClosedStreamError: + except trio.ClosedResourceError: log.error( f"Failed to ship error to parent " f"{self._parent_chan.uid}, channel was closed")