RFR: 8274524: SSLSocket.close() hangs if it is called during the ssl handshake
Alexey Bakhtin
abakhtin at openjdk.java.net
Fri Oct 1 10:52:26 UTC 2021
On Thu, 30 Sep 2021 23:04:20 GMT, Clive Verghese <cverghese at openjdk.org> wrote:
> Hi @alexeybakhtin,
>
> Thank you for the PR.
>
> I have a question regarding the lock, Would adding a `appInput.readLock.lock()` in `SSLSocketImpl:decode(ByteBuffer)` resolve this issue?
Hi Clive,
Thank you for your review. I think you are right. It can be simplified by using the existing appInput.readLock.
SSLSocketImpl: decode () already protected by appInput.readLock in readApplicationRecord () and waitForClose (), so I've added readLock in the readHandshakeRecord (). These are the only places were decode() is called.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5760
More information about the security-dev
mailing list