src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java
branchJDK-8145252-TLS13-branch
changeset 56594 99e0f3f3f0e4
parent 56571 9dfdc35eb270
child 56611 f8f7e604e1f8
--- a/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java	Tue May 22 16:38:48 2018 -0700
+++ b/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java	Tue May 22 21:46:47 2018 -0700
@@ -473,7 +473,8 @@
     }
 
     private synchronized void ensureNegotiated() throws IOException {
-        if (conContext.isNegotiated || conContext.isClosed()) {
+        if (conContext.isNegotiated ||
+                conContext.isClosed() || conContext.isBroken) {
             return;
         }
 
@@ -552,7 +553,8 @@
             }
 
             // start handshaking if the connection has not been negotiated.
-            if (!conContext.isNegotiated && !conContext.isClosed()) {
+            if (!conContext.isNegotiated &&
+                    !conContext.isClosed() && !conContext.isBroken) {
                 ensureNegotiated();
             }
 
@@ -691,7 +693,8 @@
             }
 
             // start handshaking if the connection has not been negotiated.
-            if (!conContext.isNegotiated && !conContext.isClosed()) {
+            if (!conContext.isNegotiated &&
+                    !conContext.isClosed() && !conContext.isBroken) {
                 ensureNegotiated();
             }