Only resolve host if explicitly allowed.

We have some settings that prevent host name resolution which should
be repected by InetSocketTransportAddress#getHost() to only resolve if
allowed or desired.
This commit is contained in:
Simon Willnauer 2015-08-19 14:54:56 +02:00
parent bbf669506b
commit bd56b0a79e
1 changed files with 5 additions and 1 deletions

View File

@ -94,7 +94,11 @@ public final class InetSocketTransportAddress implements TransportAddress {
@Override
public String getHost() {
return address.getHostName();
if (resolveAddress) {
return address.getHostName();
} else {
return getAddress();
}
}
@Override