Skip to content

Commit

Permalink
Avoid printing weird "nodename nor servname provided" when host is '*'
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberw committed Dec 12, 2024
1 parent 06bb786 commit 961123f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions locust/rpc/zmqrpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 961123f

Please sign in to comment.