Skip to content

Commit d9805b3

Browse files
authored
Update cluster.jl
1 parent 99e7780 commit d9805b3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/cluster.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1282,9 +1282,8 @@ function choose_bind_addr()
12821282
# We prefer IPv4 over IPv6.
12831283
#
12841284
# We also prefer non-link-local over link-local.
1285-
# (This is because on HPC clusters, link-local addresses are usually not usable for
1286-
# communication between compute nodes.
1287-
# Therefore, we use the first non-link-local IPv4 address.
1285+
# (This is because on HPC clusters, link-local addresses are usually not
1286+
# usable for communication between compute nodes.
12881287
#
12891288
# Therefore, our order of preference is:
12901289
# 1. Non-link-local IPv4
@@ -1293,7 +1292,7 @@ function choose_bind_addr()
12931292
# 4. Link-local IPv6
12941293
addrs = getipaddrs()
12951294
i = something(
1296-
findfirst(ip -> ip isa IPv4 && !islinklocaladdr(ip), addrs), # first non-link-local IPv4
1295+
findfirst(ip -> !islinklocaladdr(ip) && ip isa IPv4, addrs), # first non-link-local IPv4
12971296
findfirst(ip -> !islinklocaladdr(ip), addrs), # first non-link-local
12981297
findfirst(ip -> ip isa IPv4, addrs), # first IPv4
12991298
1, # first address

0 commit comments

Comments
 (0)