mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8274736: Concurrent read/close of SSLSockets causes SSLSessions to be invalidated unnecessarily
Reviewed-by: xuelei, wetmore
This commit is contained in:
parent
c1e41fe38b
commit
8822d41fdc
3 changed files with 429 additions and 4 deletions
|
@ -26,6 +26,7 @@
|
|||
package sun.security.ssl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.SocketException;
|
||||
import java.security.AccessControlContext;
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
|
@ -383,7 +384,12 @@ final class TransportContext implements ConnectionContext {
|
|||
|
||||
// invalidate the session
|
||||
if (conSession != null) {
|
||||
conSession.invalidate();
|
||||
// In the case of a low-layer transport error, we want to prevent
|
||||
// the session from being invalidated since this is not a TLS-level
|
||||
// error event.
|
||||
if (!(cause instanceof SocketException)) {
|
||||
conSession.invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
if (handshakeContext != null &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue