Skip to content

Commit 6c3e189

Browse files
committed
Fix interface selection when some interfaces don't report a speed
1 parent ee6e544 commit 6c3e189

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

docs/src/_changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ This documents notable changes in DistributedNext.jl. The format is based on
1919
port is specified. Previously this would cause errors when the workers all
2020
tried to bind to the same port, now all additional workers will treat the bind
2121
port as a port hint ([#19]).
22+
- Fixed a bug in the network interface selection code that would cause it to
23+
error when only a subset of interfaces reported the negotiation speed
24+
([#29]).
2225

2326
### Added
2427
- A watcher mechanism has been added to detect when both the Distributed stdlib

src/cluster.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,8 +1374,8 @@ function init_bind_addr()
13741374
# If none of them report speed just pick the first one
13751375
bind_addr = string(interfaces[1].ip)
13761376
else
1377-
idx = findmax(x -> x.speed, interfaces)[2]
1378-
bind_addr = string(interfaces[idx].ip)
1377+
idx = findmax(x -> x.speed, interfaces_with_speed)[2]
1378+
bind_addr = string(interfaces_with_speed[idx].ip)
13791379
end
13801380
end
13811381
end

0 commit comments

Comments
 (0)