You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2018/06/26 01:25:43 UTC
[GitHub] liubao68 commented on a change in pull request #776: [SCB-693]
registry microservice failed if failed to get host address
liubao68 commented on a change in pull request #776: [SCB-693] registry microservice failed if failed to get host address
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/776#discussion_r197989058
##########
File path: foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/net/NetUtils.java
##########
@@ -189,10 +190,26 @@ public static String getRealListenAddress(String schema, String address) {
}
public static String getHostName() {
+ if (hostName == null) {
+ try {
+ InetAddress localHost = InetAddress.getLocalHost();
+ hostName = localHost.getHostName();
+ } catch (UnknownHostException e) {
Review comment:
This implementation is not consistence with initialization logic.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services