mirror of https://github.com/vllm-project/vllm
[Minor fix] The domain dns.google may cause a socket.gaierror exception (#3176)
Co-authored-by: guofangze <guofangze@kuaishou.com>
This commit is contained in:
parent
9cbc7e5f3b
commit
76e8a70476
|
@ -173,7 +173,7 @@ def get_ip() -> str:
|
|||
# try ipv4
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
try:
|
||||
s.connect(("dns.google", 80)) # Doesn't need to be reachable
|
||||
s.connect(("8.8.8.8", 80)) # Doesn't need to be reachable
|
||||
return s.getsockname()[0]
|
||||
except OSError:
|
||||
# try ipv6
|
||||
|
|
Loading…
Reference in New Issue