On Thu, 30 Sep 2021 23:04:20 GMT, Clive Verghese <cvergh...@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

Reply via email to