From 961123f488387f43025e4bcdc2a72e2ee29fa5bd Mon Sep 17 00:00:00 2001 From: Lars Holmberg Date: Thu, 12 Dec 2024 10:07:23 +0100 Subject: [PATCH] Avoid printing weird "nodename nor servname provided" when host is '*' --- locust/rpc/zmqrpc.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/locust/rpc/zmqrpc.py b/locust/rpc/zmqrpc.py index d5d5586129..f03ea9a204 100644 --- a/locust/rpc/zmqrpc.py +++ b/locust/rpc/zmqrpc.py @@ -64,6 +64,8 @@ def close(self, linger=None): def ipv4_only(self, host, port) -> bool: try: + if host == "*": + return False if str(csocket.getaddrinfo(host, port, proto=csocket.IPPROTO_TCP)).find("Family.AF_INET6") == -1: return True except gaierror as e: