Improve address selection in sun.net.NetworkClient

XMLWordPrintable

    • Type: Sub-task
    • Resolution: Duplicate
    • Priority: P3
    • tbd
    • Affects Version/s: None
    • Component/s: core-libs
    • None

      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.

            Assignee:
            Liam Miller-Cushon
            Reporter:
            Liam Miller-Cushon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: