From 06103d1f44e80e68b3a0dda92614962a9bf6a12d Mon Sep 17 00:00:00 2001 From: Guillermo Rodriguez Date: Sun, 13 Apr 2025 14:06:03 -0300 Subject: [PATCH] Disable parent channel append on get_peer_by_name to_scan --- tractor/_discovery.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tractor/_discovery.py b/tractor/_discovery.py index fd3e4b1c..478538c6 100644 --- a/tractor/_discovery.py +++ b/tractor/_discovery.py @@ -121,9 +121,14 @@ def get_peer_by_name( actor: Actor = current_actor() server: IPCServer = actor.ipc_server to_scan: dict[tuple, list[Channel]] = server._peers.copy() - pchan: Channel|None = actor._parent_chan - if pchan: - to_scan[pchan.uid].append(pchan) + + # TODO: is this ever needed? creates a duplicate channel on actor._peers + # when multiple find_actor calls are made to same actor from a single ctx + # which causes actor exit to hang waiting forever on + # `actor._no_more_peers.wait()` in `_runtime.async_main` + # pchan: Channel|None = actor._parent_chan + # if pchan: + # to_scan[pchan.uid].append(pchan) for aid, chans in to_scan.items(): _, peer_name = aid