diff --git a/core/src/main/java/com/linecorp/armeria/client/HttpClientDelegate.java b/core/src/main/java/com/linecorp/armeria/client/HttpClientDelegate.java index b0c4b4eb7ef..26e063db542 100644 --- a/core/src/main/java/com/linecorp/armeria/client/HttpClientDelegate.java +++ b/core/src/main/java/com/linecorp/armeria/client/HttpClientDelegate.java @@ -237,7 +237,7 @@ private void resolveProxyConfig(SessionProtocol protocol, Endpoint endpoint, Cli if (proxyConfig.proxyAddress() != null) { final Future resolveFuture = addressResolverGroup .getResolver(ctx.eventLoop().withoutContext()) - .resolve(proxyConfig.proxyAddress()); + .resolve(createUnresolvedAddressForRefreshing(proxyConfig.proxyAddress())); resolveFuture.addListener(future -> { if (future.isSuccess()) { @@ -302,4 +302,8 @@ private static void doExecute(PooledChannel pooledChannel, ClientRequestContext res.init(session.inboundTrafficController()); session.invoke(pooledChannel, ctx, req, res); } + + private static InetSocketAddress createUnresolvedAddressForRefreshing(InetSocketAddress previousAddress) { + return new InetSocketAddress(previousAddress.getHostName(), previousAddress.getPort()); + } }