Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion stdlib/Distributed/src/cluster.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1276,7 +1276,10 @@ function init_bind_addr()
else
bind_port = 0
try
bind_addr = string(getipaddr())
# Use the first non-link-local IPv4 address
addrs = Sockets.getipaddrs(Sockets.IPv4)
filter!(!Sockets.islinklocaladdr, addrs)
bind_addr = string(first(addrs))
catch
# All networking is unavailable, initialize bind_addr to the loopback address
# Will cause an exception to be raised only when used.
Expand Down