clan-cli: Fix incorrect ipv6 check in check_machine_ssh_reachable

This commit is contained in:
Qubasa
2025-07-16 12:34:30 +07:00
parent 9d61e550d5
commit f8a0943fbd

View File

@@ -531,7 +531,7 @@ def check_machine_ssh_reachable(
f"Checking SSH reachability for {remote.target} on port {remote.port or 22}",
)
address_family = socket.AF_INET6 if ":" in remote.address else socket.AF_INET
address_family = socket.AF_INET6 if remote.is_ipv6() else socket.AF_INET
for _ in range(opts.retries):
with socket.socket(address_family, socket.SOCK_STREAM) as sock:
sock.settimeout(opts.timeout)