RFR(s): 8228580: DnsClient TCP socket timeout

Pavel Rappo pavel.rappo at oracle.com
Wed Sep 4 17:11:54 UTC 2019


> On 4 Sep 2019, at 17:35, Florian Weimer <fweimer at redhat.com> wrote:
> 
> * Milan Mimica:
> 
>> Continuing in a new thread with a RFR of my own:
>> http://cr.openjdk.java.net/~mmimica/8228580/webrev.00/
> 
> I would add a comment why there's no explicit TCP connection timeout in
> the code.  I assume you rely on the TCP stack having its own timeout,
> right?  But I think it can be quite long under some circumstances.

If I get this right, there's a default timeout of 1,000 ms (1 second) on L70 src/jdk.naming.dns/share/classes/com/sun/jndi/dns/DnsContext.java which applies to the case where there's no explicit timeout. I agree though that this deserves a comment.

> The timeout will not be enforced properly if the clock jumps backwards.

Here's the link to the previous discussion:

    https://mail.openjdk.java.net/pipermail/core-libs-dev/2019-August/061918.html

If you're talking about the use of System.currentTimeMillis, then I've already told Milan that we could address that later in a follow-up bug, together with the UDP case.

-Pavel



More information about the core-libs-dev mailing list