[RFR] 8184328: JDK8u131 socketRead0 hang at SSL read

Rob McKenna rob.mckenna at oracle.com
Mon Sep 11 22:29:54 UTC 2017

Hi folks,

In high latency environments a client SSLSocket with autoClose set to false
can hang indefinitely if it does not correctly recieve a close_notify
from the server.

In order to rectify this situation I would like to suggest that we
implement an integer JDK property (jdk.tls.closeRetries) which instructs
waitForClose to attempt the close no more times than the value of the
property. I would also suggest that 5 is a reasonable default.

Note: each attempt times out based on the value of
Socket.setSoTimeout(int timeout).

Also, the behaviour here is similar to that of waitForClose() when
autoClose is set to true, less the retries.



More information about the security-dev mailing list