Skip to content

Commit

Permalink
1632: Stop doing reverse DNS lookups
Browse files Browse the repository at this point in the history
  • Loading branch information
n-miles committed May 16, 2019
1 parent 71dad6a commit 0724530
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ public EventLoopGroup getEventLoopGroup() {

public ClientStats getClientStats() {
Map<String, Long> totalConnectionsPerHost = openChannels.stream().map(Channel::remoteAddress).filter(a -> a.getClass() == InetSocketAddress.class)
.map(a -> (InetSocketAddress) a).map(InetSocketAddress::getHostName).collect(Collectors.groupingBy(Function.identity(), Collectors.counting()));
.map(a -> (InetSocketAddress) a).map(InetSocketAddress::getHostString).collect(Collectors.groupingBy(Function.identity(), Collectors.counting()));
Map<String, Long> idleConnectionsPerHost = channelPool.getIdleChannelCountPerHost();
Map<String, HostStats> statsPerHost = totalConnectionsPerHost.entrySet().stream().collect(Collectors.toMap(Entry::getKey, entry -> {
final long totalConnectionCount = entry.getValue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public Map<String, Long> getIdleChannelCountPerHost() {
.map(idle -> idle.getChannel().remoteAddress())
.filter(a -> a.getClass() == InetSocketAddress.class)
.map(a -> (InetSocketAddress) a)
.map(InetSocketAddress::getHostName)
.map(InetSocketAddress::getHostString)
.collect(Collectors.groupingBy(Function.identity(), Collectors.counting()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void clean() {

void appendRemoteAddress(StringBuilder sb) {
InetSocketAddress remoteAddress = timeoutsHolder.remoteAddress();
sb.append(remoteAddress.getHostName());
sb.append(remoteAddress.getHostString());
if (!remoteAddress.isUnresolved()) {
sb.append('/').append(remoteAddress.getAddress().getHostAddress());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public enum RequestHostnameResolver {

public Future<List<InetSocketAddress>> resolve(NameResolver<InetAddress> nameResolver, InetSocketAddress unresolvedAddress, AsyncHandler<?> asyncHandler) {

final String hostname = unresolvedAddress.getHostName();
final String hostname = unresolvedAddress.getHostString();
final int port = unresolvedAddress.getPort();
final Promise<List<InetSocketAddress>> promise = ImmediateEventExecutor.INSTANCE.newPromise();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ private static ProxyServerSelector createProxyServerSelector(final ProxySelector
return null;
} else {
InetSocketAddress address = (InetSocketAddress) proxy.address();
return proxyServer(address.getHostName(), address.getPort()).build();
return proxyServer(address.getHostString(), address.getPort()).build();
}
case DIRECT:
return null;
Expand Down

0 comments on commit 0724530

Please sign in to comment.