File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
dubbo-common/src/main/java/org/apache/dubbo/common/utils Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -544,6 +544,7 @@ public static NetworkInterface findNetworkInterface() {
544
544
}
545
545
}
546
546
547
+
547
548
if (result == null ) { // If not found, try to get the first one
548
549
for (NetworkInterface networkInterface : validNetworkInterfaces ) {
549
550
Enumeration <InetAddress > addresses = networkInterface .getInetAddresses ();
@@ -552,7 +553,11 @@ public static NetworkInterface findNetworkInterface() {
552
553
if (addressOp .isPresent ()) {
553
554
try {
554
555
if (addressOp .get ().isReachable (100 )) {
555
- return networkInterface ;
556
+ if (addressOp .get ().isSiteLocalAddress ()) {
557
+ return networkInterface ;
558
+ } else {
559
+ result = networkInterface ;
560
+ }
556
561
}
557
562
} catch (IOException e ) {
558
563
// ignore
You can’t perform that action at this time.
0 commit comments