On Wed, 4 Sep 2019 at 20:32, Florian Weimer <fwei...@redhat.com> wrote: > > If you use the initial UDP timeout (one second, I think), the kernel > will not complete the TCP handshake if the initial SYN segment is lost > because the retransmit delay during the handshake is longer than that.
We could set a higher timeout value, but I would not prefer that. After all, 1 second is just default value, and can be changed. If the user wants us to give up on DNS query after the specified timeout then lets do just that. True, some queries that previously worked might start failing, but that is true even for slow socket.read() operations. New webrev: http://cr.openjdk.java.net/~mmimica/8228580/webrev.01/ * simplified test with no thread (nice catch Pavel) * set connect timeout and account for it -- Milan Mimica