forked from goodboy/tractor
1
0
Fork 0

Always cast arbiter addr to tuple

msgspec_infect_asyncio
Tyler Goodlet 2021-06-11 16:21:26 -04:00
parent 132b9651dd
commit 5e03108211
1 changed files with 10 additions and 2 deletions

View File

@ -317,7 +317,7 @@ class Actor:
# TODO: consider making this a dynamically defined # TODO: consider making this a dynamically defined
# @dataclass once we get py3.7 # @dataclass once we get py3.7
self.loglevel = loglevel 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 # marked by the process spawning backend at startup
# will be None for the parent most process started manually # will be None for the parent most process started manually
@ -791,6 +791,14 @@ class Actor:
_state._runtime_vars.update(rvs) _state._runtime_vars.update(rvs)
for attr, value in parent_data.items(): for attr, value in parent_data.items():
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) setattr(self, attr, value)
return chan, accept_addr return chan, accept_addr