You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "dianjifzm (via GitHub)" <gi...@apache.org> on 2024/03/01 07:19:02 UTC
Re: [PR] Performance improvement of NetUtils [dubbo]
dianjifzm commented on code in PR #13745:
URL: https://github.com/apache/dubbo/pull/13745#discussion_r1508571126
##########
dubbo-common/src/main/java/org/apache/dubbo/common/utils/NetUtils.java:
##########
@@ -387,19 +386,18 @@ private static InetAddress getLocalAddress0() {
logger.warn(e);
}
+ InetAddress localAddress = getLocalAddressV6();
+ if (localAddress != null) {
+ return localAddress;
+ }
Review Comment:
这个位置如果不修复,String getLocalHost() 方法返回的是null,修复后返回的是127.0.0.1
缓存只是指提升了效率,这个位置是修复了逻辑
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org