diff --git a/jetty-client/src/test/java/org/eclipse/jetty/client/HostnameVerificationTest.java b/jetty-client/src/test/java/org/eclipse/jetty/client/HostnameVerificationTest.java index 34be934ccd2..bced4407969 100644 --- a/jetty-client/src/test/java/org/eclipse/jetty/client/HostnameVerificationTest.java +++ b/jetty-client/src/test/java/org/eclipse/jetty/client/HostnameVerificationTest.java @@ -116,8 +116,8 @@ public class HostnameVerificationTest // Therefore this test may catch a SSLHandshakeException, or a ClosedChannelException. // If it is the former, we verify that its cause is a CertificateException. - // ExecutionException wraps an EofException that wraps the SSLHandshakeException - Throwable cause = x.getCause().getCause(); + // ExecutionException wraps an SSLHandshakeException + Throwable cause = x.getCause(); if (cause instanceof SSLHandshakeException) assertThat(cause.getCause().getCause(), instanceOf(CertificateException.class)); else diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java b/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java index fc477c040e2..db83763f337 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java @@ -632,11 +632,6 @@ public class SslConnection extends AbstractConnection } } } - catch (SSLException e) - { - getEndPoint().close(); - throw new EofException(e); - } catch (Exception e) { getEndPoint().close();