JDK 9 RFR of 8165664: (ch) sun.nio.ch.SocketAdaptor does not respect timeout in case of system date/time change and blocks

Brian Burkhalter brian.burkhalter at oracle.com
Mon Dec 19 22:14:46 UTC 2016

An updated patch which passes regression tests is here:




On Dec 19, 2016, at 12:08 PM, Martin Buchholz <martinrb at google.com> wrote:

> It's unfortunate the use of int millis timeout is baked into the API.
> It's probably best (and traditional) to work with an internal long nanos field anyways, so there are no millisecond sized roundoff errors.
> I sometimes find it easier to understand if I define a deadline
> final long deadline = System.nanoTime() + nanosTimeout;
> I would do unit conversions using methods from TimeUnit.

More information about the nio-dev mailing list