On Thu, 10 Feb 2022 18:19:41 GMT, Alexey Bakhtin <abakh...@openjdk.org> wrote:

> Please review the patch for the JDK-8274524
> 
> SSLSocket.close() could cause an intermittent hang of the socket read 
> operation. It happens in case of SO_TIMEOUT is set to 0 (infinite timeout).
> SSLSocket.close() reads from the socket as part of the skip() operation to 
> prevent TCP Connection reset (see JDK-8268965). Socket reads are performed in 
> a loop for small chunks. These read operations could cause a deadlock, in 
> case of SO_TIMEOUT = 0
> I suggest to force non-zero SO_TIMEOUT during the skip() operation to prevent 
> such deadlock
> 
> This is a second iteration of review. Previous PR was closed without 
> integration: https://github.com/openjdk/jdk/pull/5760

This pull request has now been integrated.

Changeset: 58dae60d
Author:    Alexey Bakhtin <abakh...@openjdk.org>
URL:       
https://git.openjdk.java.net/jdk/commit/58dae60da0711c4ae0cb23f8ce2328e051d603b2
Stats:     151 lines in 2 files changed: 151 ins; 0 del; 0 mod

8274524: SSLSocket.close() hangs if it is called during the ssl handshake

Reviewed-by: xuelei

-------------

PR: https://git.openjdk.java.net/jdk/pull/7432

Reply via email to