Skip to content

Commit 094b528

Browse files
remove choose ip family based on node ip for get_localhost_address
Signed-off-by: Yicheng-Lu-llll <luyc58576@gmail.com>
1 parent 037b5fa commit 094b528

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

python/ray/_common/network_utils.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,8 @@ def get_localhost_address() -> str:
6969
"""Get localhost loopback address with IPv4/IPv6 support.
7070
7171
Returns:
72-
The localhost loopback IP address (matching node IP family or auto-detected).
72+
The localhost loopback IP address.
7373
"""
74-
import ray._private.worker
75-
76-
if (
77-
ray._private.worker._global_node is not None
78-
and ray._private.worker._global_node.node_ip_address
79-
):
80-
node_ip = ray._private.worker._global_node.node_ip_address
81-
return "::1" if is_ipv6_ip(node_ip) else "127.0.0.1"
82-
8374
# Try IPv4 first, then IPv6 localhost resolution
8475
for family in [socket.AF_INET, socket.AF_INET6]:
8576
try:

0 commit comments

Comments
 (0)