Use 127.0.0.1 in win32 as node ip addr (#19362)

This commit is contained in:
Gagandeep Singh 2021-10-19 04:21:15 +05:30 committed by GitHub
parent e9f66cc394
commit 0b82135d2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -402,8 +402,8 @@ def node_ip_address_from_perspective(address):
def get_node_ip_address(address="8.8.8.8:53"): def get_node_ip_address(address="8.8.8.8:53"):
if ray.worker._global_node is not None: if ray.worker._global_node is not None:
return ray.worker._global_node.node_ip_address return ray.worker._global_node.node_ip_address
if sys.platform == "darwin": if sys.platform == "darwin" or sys.platform == "win32":
# Due to the mac osx firewall, # Due to the mac osx/windows firewall,
# we use loopback ip as the ip address # we use loopback ip as the ip address
# to prevent security popups. # to prevent security popups.
return "127.0.0.1" return "127.0.0.1"