MarsOu1995 commented on a change in pull request #1656:
URL: https://github.com/apache/incubator-shenyu/pull/1656#discussion_r655488891



##########
File path: 
shenyu-client/shenyu-client-dubbo/shenyu-client-apache-dubbo/src/main/java/org/apache/shenyu/client/apache/dubbo/ApacheDubboServiceBeanListener.java
##########
@@ -104,7 +104,7 @@ private MetaDataRegisterDTO buildMetaDataDTO(final 
ServiceBean serviceBean, fina
         String path = contextPath + shenyuDubboClient.path();
         String desc = shenyuDubboClient.desc();
         String serviceName = serviceBean.getInterface();
-        String host = StringUtils.isBlank(this.host) ? IpUtils.getHost() : 
this.host;
+        String host = IpUtils.getHost(this.host);

Review comment:
       If'host' is empty, then get the first ip. If it is an incomplete ip, the 
first suitable one will be matched.
    If your input is complete, this is the one you get. After all, you are 
unlikely to have two IPs on the same network segment. 




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to