mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Don't fail if can't create a socket to check master connection.
This happens for instance if ipv6 is disabled in the kernel but /etc/hosts contains both ipv4 and ipv6 records for 'localhost'.
This commit is contained in:
parent
ea656e92c6
commit
44e2ad24df
@ -793,8 +793,8 @@ def dns_check(addr, port, safe=False, ipv6=None):
|
||||
if h[0] != socket.AF_INET6 or ipv6 is not None:
|
||||
candidates.append(candidate_addr)
|
||||
|
||||
s = socket.socket(h[0], socket.SOCK_STREAM)
|
||||
try:
|
||||
s = socket.socket(h[0], socket.SOCK_STREAM)
|
||||
s.connect((candidate_addr.strip('[]'), port))
|
||||
s.close()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user