changeset 5273:2cdecf645b13

7179879: SSLSocket connect times out instead of throwing socket closed exception Reviewed-by: xuelei, chegar
author coffeys
date Thu, 26 Jul 2012 22:00:55 +0100
parents f7ac6a1d5853
children 94a098bac0c2
files src/share/classes/sun/security/ssl/SSLSocketImpl.java
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/security/ssl/SSLSocketImpl.java	Tue Aug 28 17:25:07 2012 +0800
+++ b/src/share/classes/sun/security/ssl/SSLSocketImpl.java	Thu Jul 26 22:00:55 2012 +0100
@@ -1576,11 +1576,9 @@
         Throwable cachedThrowable = null;
         try {
             switch (state) {
-            /*
-             * java.net code sometimes closes sockets "early", when
-             * we can't actually do I/O on them.
-             */
             case cs_START:
+                // unconnected socket or handshaking has not been initialized
+                closeSocket(selfInitiated);
                 break;
 
             /*