From 42be410076ad2566b7d85c1941ae76155fb72c0a Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sat, 8 Aug 2020 20:27:43 -0400 Subject: [PATCH] Handle mp accept_addr --- tractor/_actor.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tractor/_actor.py b/tractor/_actor.py index e426be0..94eab7f 100644 --- a/tractor/_actor.py +++ b/tractor/_actor.py @@ -578,6 +578,9 @@ class Actor: for attr, value in parent_data.items(): setattr(self, attr, value) + else: # mp + accept_addr = None + return chan, accept_addr except OSError: # failed to connect @@ -613,9 +616,14 @@ class Actor: # establish primary connection with immediate parent self._parent_chan = None if parent_addr is not None: - self._parent_chan, accept_addr = await self._chan_to_parent( + self._parent_chan, accept_addr_from_rent = await self._chan_to_parent( parent_addr) + # either it's passed in because we're not a child + # or because we're running in mp mode + if accept_addr_from_rent is not None: + accept_addr = accept_addr_from_rent + # load exposed/allowed RPC modules # XXX: do this **after** establishing a channel to the parent # but **before** starting the message loop for that channel