forked from goodboy/tractor
Don't enter debug on closed resource errors
parent
98bbf8e0df
commit
12f987514d
|
@ -197,9 +197,11 @@ async def _invoke(
|
||||||
|
|
||||||
# TODO: maybe we'll want differnet "levels" of debugging
|
# TODO: maybe we'll want differnet "levels" of debugging
|
||||||
# eventualy such as ('app', 'supervisory', 'runtime') ?
|
# eventualy such as ('app', 'supervisory', 'runtime') ?
|
||||||
if not isinstance(err, trio.ClosedResourceError) and (
|
if (
|
||||||
not is_multi_cancelled(err)) and (
|
not is_multi_cancelled(err) and (
|
||||||
not isinstance(err, ContextCancelled)
|
not isinstance(err, ContextCancelled) or
|
||||||
|
(isinstance(err, ContextCancelled) and ctx._cancel_called)
|
||||||
|
)
|
||||||
):
|
):
|
||||||
# XXX: is there any case where we'll want to debug IPC
|
# XXX: is there any case where we'll want to debug IPC
|
||||||
# disconnects? I can't think of a reason that inspecting
|
# disconnects? I can't think of a reason that inspecting
|
||||||
|
@ -519,8 +521,8 @@ class Actor:
|
||||||
send_chan, recv_chan = self._cids2qs[(chan.uid, cid)]
|
send_chan, recv_chan = self._cids2qs[(chan.uid, cid)]
|
||||||
assert send_chan.cid == cid # type: ignore
|
assert send_chan.cid == cid # type: ignore
|
||||||
|
|
||||||
if 'error' in msg:
|
# if 'error' in msg:
|
||||||
ctx = getattr(recv_chan, '_ctx', None)
|
# ctx = getattr(recv_chan, '_ctx', None)
|
||||||
# if ctx:
|
# if ctx:
|
||||||
# ctx._error_from_remote_msg(msg)
|
# ctx._error_from_remote_msg(msg)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue