Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4138070

InetAddress.getAllByName caches failures unconditionally without timing out

XMLWordPrintable

    • b02
    • unknown, x86
    • solaris_2.6, windows_nt



        Name: diC59631 Date: 05/13/98


        The code for InetAdress.getAllByName shows that
        it caches the fact that it failed to lookup a
        name so it can avoid the lookup in the future.

        The problem is that isn't always the right thing
        to do. If you're on a machine with dialup
        access, sometimes the dialup to the ISP will fail
        preventing any lookups from suceeding. If you
        retry the dialup connection and it succeeds you
        still can't resolve the hosts because the failure
        from the previous attempt was cached. I suggest
        either not caching failures at all or providing
        some system property to selectively disable failure
        caching.
        (Review ID: 29129)
        ======================================================================

              pongsunw Patrick Ong (Inactive)
              dindrigo Daniel Indrigo (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: