changeset 14949:aec205dc9672

8235263: Revert TLS 1.3 change that wrapped IOExceptions Reviewed-by: mullan
author xuelei
date Tue, 03 Dec 2019 17:15:02 -0800
parents daac853357a5
children 30b59c809b5f
files src/share/classes/sun/security/ssl/SSLSocketImpl.java
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/security/ssl/SSLSocketImpl.java	Thu Nov 19 19:09:22 2020 +0000
+++ b/src/share/classes/sun/security/ssl/SSLSocketImpl.java	Tue Dec 03 17:15:02 2019 -0800
@@ -1180,9 +1180,11 @@
             } catch (SSLHandshakeException she) {
                 // may be record sequence number overflow
                 throw conContext.fatal(Alert.HANDSHAKE_FAILURE, she);
-            } catch (IOException e) {
-                throw conContext.fatal(Alert.UNEXPECTED_MESSAGE, e);
-            }
+            } catch (SSLException ssle) {
+                throw conContext.fatal(Alert.UNEXPECTED_MESSAGE, ssle);
+            }   // re-throw other IOException, which should be caused by
+                // the underlying plain socket and could be handled by
+                // applications (for example, re-try the connection).
 
             // Is the sequence number is nearly overflow, or has the key usage
             // limit been reached?