forked from goodboy/tractor
Ensure arbiter sockaddr type before usage
parent
a4874a3227
commit
d27c081a15
|
@ -455,7 +455,7 @@ class Actor:
|
||||||
self._mods: dict[str, ModuleType] = {}
|
self._mods: dict[str, ModuleType] = {}
|
||||||
self.loglevel = loglevel
|
self.loglevel = loglevel
|
||||||
|
|
||||||
self._arb_addr = (
|
self._arb_addr: tuple[str, int] | None = (
|
||||||
str(arbiter_addr[0]),
|
str(arbiter_addr[0]),
|
||||||
int(arbiter_addr[1])
|
int(arbiter_addr[1])
|
||||||
) if arbiter_addr else None
|
) if arbiter_addr else None
|
||||||
|
@ -1381,6 +1381,7 @@ async def async_main(
|
||||||
and not actor.is_arbiter
|
and not actor.is_arbiter
|
||||||
):
|
):
|
||||||
failed = False
|
failed = False
|
||||||
|
assert isinstance(actor._arb_addr, tuple)
|
||||||
with trio.move_on_after(0.5) as cs:
|
with trio.move_on_after(0.5) as cs:
|
||||||
cs.shield = True
|
cs.shield = True
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue