|
@@ -115,13 +115,10 @@ public abstract class BaseHttpServer {
|
|
final Optional<Integer> addressPort =
|
|
final Optional<Integer> addressPort =
|
|
getPortNumberFromConfigKeys(conf, addressKey);
|
|
getPortNumberFromConfigKeys(conf, addressKey);
|
|
|
|
|
|
- final Optional<String> addresHost =
|
|
|
|
|
|
+ final Optional<String> addressHost =
|
|
getHostNameFromConfigKeys(conf, addressKey);
|
|
getHostNameFromConfigKeys(conf, addressKey);
|
|
|
|
|
|
- String hostName = bindHost.orElse(addresHost.get());
|
|
|
|
- if (hostName == null || hostName.isEmpty()) {
|
|
|
|
- hostName = bindHostDefault;
|
|
|
|
- }
|
|
|
|
|
|
+ String hostName = bindHost.orElse(addressHost.orElse(bindHostDefault));
|
|
|
|
|
|
return NetUtils.createSocketAddr(
|
|
return NetUtils.createSocketAddr(
|
|
hostName + ":" + addressPort.orElse(bindPortdefault));
|
|
hostName + ":" + addressPort.orElse(bindPortdefault));
|