forked from goodboy/tractor
Port to trio's new resource error
parent
163f747afb
commit
bd14cbe082
|
@ -189,8 +189,7 @@ class Actor:
|
||||||
self,
|
self,
|
||||||
stream: trio.SocketStream,
|
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()
|
self._no_more_peers.clear()
|
||||||
chan = Channel(stream=stream)
|
chan = Channel(stream=stream)
|
||||||
|
@ -456,7 +455,7 @@ class Actor:
|
||||||
try:
|
try:
|
||||||
await self._parent_chan.send(
|
await self._parent_chan.send(
|
||||||
{'error': traceback.format_exc(), 'cid': 'internal'})
|
{'error': traceback.format_exc(), 'cid': 'internal'})
|
||||||
except trio.ClosedStreamError:
|
except trio.ClosedResourceError:
|
||||||
log.error(
|
log.error(
|
||||||
f"Failed to ship error to parent "
|
f"Failed to ship error to parent "
|
||||||
f"{self._parent_chan.uid}, channel was closed")
|
f"{self._parent_chan.uid}, channel was closed")
|
||||||
|
|
Loading…
Reference in New Issue