From 42d621bba7b1e133fa917f12d4c6fe791e90dbab Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 18 Oct 2023 19:10:04 -0400 Subject: [PATCH] Always dynamically re-read the `._root._default_lo_addrs` value in `find_actor()` --- tractor/_discovery.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tractor/_discovery.py b/tractor/_discovery.py index 1fa2a88..070321b 100644 --- a/tractor/_discovery.py +++ b/tractor/_discovery.py @@ -192,8 +192,11 @@ async def find_actor( yield None if not registry_addrs: - from ._root import _default_lo_addrs - registry_addrs = _default_lo_addrs + # XXX NOTE: make sure to dynamically read the value on + # every call since something may change it globally (eg. + # like in our discovery test suite)! + from . import _root + registry_addrs = _root._default_lo_addrs maybe_portals: list[ AsyncContextManager[tuple[str, int]]