Always dynamically re-read the `._root._default_lo_addrs` value in `find_actor()`

multihomed
Tyler Goodlet 2023-10-18 19:10:04 -04:00
parent 2e81ccf5b4
commit 42d621bba7
1 changed files with 5 additions and 2 deletions

View File

@ -192,8 +192,11 @@ async def find_actor(
yield None yield None
if not registry_addrs: if not registry_addrs:
from ._root import _default_lo_addrs # XXX NOTE: make sure to dynamically read the value on
registry_addrs = _default_lo_addrs # 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[ maybe_portals: list[
AsyncContextManager[tuple[str, int]] AsyncContextManager[tuple[str, int]]