mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
Merge branch 'pr-#669' into 4.3.4
This commit is contained in:
commit
88ebd5e042
@ -155,6 +155,9 @@ public class NetUtils {
|
|||||||
log.warn("[Net] findNetworkInterface failed", e);
|
log.warn("[Net] findNetworkInterface failed", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// sort by interface index, the smaller is preferred.
|
||||||
|
validNetworkInterfaces.sort(Comparator.comparingInt(NetworkInterface::getIndex));
|
||||||
|
|
||||||
// Try to find the preferred one
|
// Try to find the preferred one
|
||||||
for (NetworkInterface networkInterface : validNetworkInterfaces) {
|
for (NetworkInterface networkInterface : validNetworkInterfaces) {
|
||||||
if (isPreferredNetworkInterface(networkInterface)) {
|
if (isPreferredNetworkInterface(networkInterface)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user