mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8239798: SSLSocket closes socket both socket endpoints on a SocketTimeoutException
Reviewed-by: xuelei
This commit is contained in:
parent
6275aee690
commit
14e37ba3df
5 changed files with 128 additions and 113 deletions
|
@ -436,6 +436,8 @@ public final class SSLSocketImpl
|
|||
if (!conContext.isNegotiated) {
|
||||
readHandshakeRecord();
|
||||
}
|
||||
} catch (InterruptedIOException iioe) {
|
||||
handleException(iioe);
|
||||
} catch (IOException ioe) {
|
||||
throw conContext.fatal(Alert.HANDSHAKE_FAILURE,
|
||||
"Couldn't kickstart handshaking", ioe);
|
||||
|
@ -1374,12 +1376,11 @@ public final class SSLSocketImpl
|
|||
}
|
||||
} catch (SSLException ssle) {
|
||||
throw ssle;
|
||||
} catch (InterruptedIOException iioe) {
|
||||
// don't change exception in case of timeouts or interrupts
|
||||
throw iioe;
|
||||
} catch (IOException ioe) {
|
||||
if (!(ioe instanceof SSLException)) {
|
||||
throw new SSLException("readHandshakeRecord", ioe);
|
||||
} else {
|
||||
throw ioe;
|
||||
}
|
||||
throw new SSLException("readHandshakeRecord", ioe);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1440,6 +1441,9 @@ public final class SSLSocketImpl
|
|||
}
|
||||
} catch (SSLException ssle) {
|
||||
throw ssle;
|
||||
} catch (InterruptedIOException iioe) {
|
||||
// don't change exception in case of timeouts or interrupts
|
||||
throw iioe;
|
||||
} catch (IOException ioe) {
|
||||
if (!(ioe instanceof SSLException)) {
|
||||
throw new SSLException("readApplicationRecord", ioe);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue