Skip to content

Commit 875cd5a

Browse files
authored
Rewrite the code to be a bit more explicit
1 parent 2a6ee53 commit 875cd5a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cluster.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,9 +1293,9 @@ function choose_bind_addr()
12931293
addrs = getipaddrs()
12941294
i = something(
12951295
findfirst(ip -> !islinklocaladdr(ip) && ip isa IPv4, addrs), # first non-link-local IPv4
1296-
findfirst(ip -> !islinklocaladdr(ip), addrs), # first non-link-local
1296+
findfirst(ip -> !islinklocaladdr(ip) && ip isa IPv6, addrs), # first non-link-local IPv6
12971297
findfirst(ip -> ip isa IPv4, addrs), # first IPv4
1298-
1, # first address
1298+
findfirst(ip -> ip isa IPv6, addrs), # first IPv6
12991299
)
13001300
return addrs[i]
13011301
end

0 commit comments

Comments
 (0)