On Fri, 1 Oct 2021 10:49:00 GMT, Alexey Bakhtin <abakh...@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

Reply via email to