diff --git a/jdk/src/java.base/share/classes/sun/security/ssl/ClientHandshaker.java b/jdk/src/java.base/share/classes/sun/security/ssl/ClientHandshaker.java index a6878bd9652..db04d77f254 100644 --- a/jdk/src/java.base/share/classes/sun/security/ssl/ClientHandshaker.java +++ b/jdk/src/java.base/share/classes/sun/security/ssl/ClientHandshaker.java @@ -672,6 +672,9 @@ final class ClientHandshaker extends Handshaker { } } else { // we wanted to resume, but the server refused + // + // Invalidate the session in case of reusing next time. + session.invalidate(); session = null; if (!enableNewSession) { throw new SSLException("New session creation is disabled");