JDK 8 RFR 8010371: getaddrinfo can fail with EAI_SYSTEM/EAGAIN, causes UnknownHostException to be thrown

Brian Burkhalter brian.burkhalter at oracle.com
Tue Oct 1 20:27:23 UTC 2013


On Oct 1, 2013, at 1:25 PM, Michael McMahon wrote:

>> The approach I initially was going to take was to retry once after a short wait and then fail with the proposed exception if the retry failed.
> 
> I'm not sure about the short wait. I know the submitter claims that it worked after 50ms, but I don't
> think we could generalise that behavior in the library. Maybe, there is value in repeating immediately, though
> it is less likely the temporary condition will have resolved.

It does seem better to let the calling code retry if it wants based on the class of the exception.

Brian


More information about the core-libs-dev mailing list