Skip to content

Commit

Permalink
Always cast arbiter addr to tuple
Browse files Browse the repository at this point in the history
  • Loading branch information
goodboy committed Sep 18, 2021
1 parent 4d55b2b commit 70e22c1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tractor/_actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def __init__(
# TODO: consider making this a dynamically defined
# @dataclass once we get py3.7
self.loglevel = loglevel
self._arb_addr = tuple(arbiter_addr) if arbiter_addr is not None else None
self._arb_addr = tuple(arbiter_addr) if arbiter_addr is not None else (None, None)

# marked by the process spawning backend at startup
# will be None for the parent most process started manually
Expand Down Expand Up @@ -791,7 +791,15 @@ async def _from_parent(
_state._runtime_vars.update(rvs)

for attr, value in parent_data.items():
setattr(self, attr, value)

if attr == '_arb_addr':
# XXX: msgspec doesn't support serializing tuples
# so just cash manually here since it's what our
# internals expect.
self._arb_addr = tuple(value)

else:
setattr(self, attr, value)

return chan, accept_addr

Expand Down

0 comments on commit 70e22c1

Please sign in to comment.