sun.net.NetworkClient uses `InetSocketAddress(String hostname, int port)` to convert a hostname to an IP address, and then connects to it or fails:
https://github.com/openjdk/jdk/blob/402cb6a550f60c75f93c709b5e5902f3757a8acd/src/java.base/share/classes/sun/net/NetworkClient.java#L177-L183
As described in https://bugs.openjdk.org/browse/JDK-8170568, this preferred approach is to use getAllByName() and a connect() loop. This sub-task tracks fixing NetworkClient to use that approach.
https://github.com/openjdk/jdk/blob/402cb6a550f60c75f93c709b5e5902f3757a8acd/src/java.base/share/classes/sun/net/NetworkClient.java#L177-L183
As described in https://bugs.openjdk.org/browse/JDK-8170568, this preferred approach is to use getAllByName() and a connect() loop. This sub-task tracks fixing NetworkClient to use that approach.
- duplicates
-
JDK-8170568 Improve address selection for network clients
- Open
- relates to
-
JDK-8170568 Improve address selection for network clients
- Open
- links to
-
Review openjdk/jdk/15078