RFR: 8274524: SSLSocket.close() hangs if it is called during the ssl handshake
Clive Verghese
cverghese at openjdk.java.net
Fri Oct 1 15:33:29 UTC 2021
On Fri, 1 Oct 2021 10:49:00 GMT, Alexey Bakhtin <abakhtin 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 @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.
Thank you @alexeybakhtin,
The change looks good to me, but I am not a reviewer.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5760
More information about the security-dev
mailing list