fix: rollback NetUtils's interface index sort

This commit is contained in:
tjq 2023-08-14 23:14:44 +08:00
parent bdcc9b131d
commit 91abbc03d9

View File

@ -170,8 +170,8 @@ public class NetUtils {
log.warn("[Net] findNetworkInterface failed", e);
}
// sort by interface index, the smaller is preferred.
validNetworkInterfaces.sort(Comparator.comparingInt(NetworkInterface::getIndex));
// sort by interface index, the smaller is preferred. 部分用户反馈 IP 获取逻辑反而劣化了先注释
// validNetworkInterfaces.sort(Comparator.comparingInt(NetworkInterface::getIndex));
// Try to find the preferred one
for (NetworkInterface networkInterface : validNetworkInterfaces) {