Handle null host ip from NetUtils.getDefaultHostIp().

This commit is contained in:
Min Chen 2013-05-23 13:05:01 -07:00
parent 8d08f9b74b
commit 1e21b0b0e8

View File

@ -57,7 +57,11 @@ public class LocalHostEndpoint implements EndPoint {
@Override
public String getPublicAddr() {
return NetUtils.getDefaultHostIp();
String hostIp= NetUtils.getDefaultHostIp();
if (hostIp != null)
return hostIp;
else
return "127.0.0.0";
}
@Override