From 91abbc03d9f75a634119cc70874a66a876c092f8 Mon Sep 17 00:00:00 2001 From: tjq Date: Mon, 14 Aug 2023 23:14:44 +0800 Subject: [PATCH] fix: rollback NetUtils's interface index sort --- .../src/main/java/tech/powerjob/common/utils/NetUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/powerjob-common/src/main/java/tech/powerjob/common/utils/NetUtils.java b/powerjob-common/src/main/java/tech/powerjob/common/utils/NetUtils.java index b6a3fe93..79aeb85e 100644 --- a/powerjob-common/src/main/java/tech/powerjob/common/utils/NetUtils.java +++ b/powerjob-common/src/main/java/tech/powerjob/common/utils/NetUtils.java @@ -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) {