Mask tpt-closed handling of `chan.send(return_msg)`
A partial revert of commit c05d08e426
since it seem we already
suppress tpt-closed errors lower down in `.ipc.Channel.send()`; given
that i'm pretty sure this new handler code should basically never run?
Left in a todo to remove the masked content once i'm done more
thoroughly testing under `piker`.
final_eg_refinements
parent
8802756216
commit
122c855db7
|
@ -324,8 +324,8 @@ async def _errors_relayed_via_ipc(
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
# TODO? better then `debug_filter` below?
|
# TODO? better then `debug_filter` below?
|
||||||
# and
|
and
|
||||||
# not isinstance(err, TransportClosed)
|
not isinstance(err, TransportClosed)
|
||||||
):
|
):
|
||||||
# XXX QUESTION XXX: is there any case where we'll
|
# XXX QUESTION XXX: is there any case where we'll
|
||||||
# want to debug IPC disconnects as a default?
|
# want to debug IPC disconnects as a default?
|
||||||
|
@ -693,20 +693,23 @@ async def _invoke(
|
||||||
f'\n'
|
f'\n'
|
||||||
f'{pretty_struct.pformat(return_msg)}\n'
|
f'{pretty_struct.pformat(return_msg)}\n'
|
||||||
)
|
)
|
||||||
try:
|
|
||||||
await chan.send(return_msg)
|
await chan.send(return_msg)
|
||||||
except TransportClosed:
|
# ?TODO, remove the below since .send() already
|
||||||
log.exception(
|
# doesn't raise on tpt-closed?
|
||||||
f"Failed send final result to 'parent'-side of IPC-ctx!\n"
|
# try:
|
||||||
f'\n'
|
# await chan.send(return_msg)
|
||||||
f'{chan}\n'
|
# except TransportClosed:
|
||||||
f'Channel already disconnected ??\n'
|
# log.exception(
|
||||||
f'\n'
|
# f"Failed send final result to 'parent'-side of IPC-ctx!\n"
|
||||||
f'{pretty_struct.pformat(return_msg)}'
|
# f'\n'
|
||||||
)
|
# f'{chan}\n'
|
||||||
# ?TODO? will this ever be true though?
|
# f'Channel already disconnected ??\n'
|
||||||
if chan.connected():
|
# f'\n'
|
||||||
raise
|
# f'{pretty_struct.pformat(return_msg)}'
|
||||||
|
# )
|
||||||
|
# # ?TODO? will this ever be true though?
|
||||||
|
# if chan.connected():
|
||||||
|
# raise
|
||||||
|
|
||||||
# NOTE: this happens IFF `ctx._scope.cancel()` is
|
# NOTE: this happens IFF `ctx._scope.cancel()` is
|
||||||
# called by any of,
|
# called by any of,
|
||||||
|
|
Loading…
Reference in New Issue