< prev index next >

src/share/classes/sun/security/ssl/SSLSocketImpl.java

Print this page
rev 14406 : 8239798: SSLSocket closes socket both socket endpoints on a SocketTimeoutException
Reviewed-by: xuelei
Contributed-by: alexey@azul.com verghese@amazon.com

*** 432,441 **** --- 432,443 ---- // // Handle handshake messages only, need no application data. if (!conContext.isNegotiated) { readHandshakeRecord(); } + } catch (InterruptedIOException iioe) { + handleException(iioe); } catch (IOException ioe) { throw conContext.fatal(Alert.HANDSHAKE_FAILURE, "Couldn't kickstart handshaking", ioe); } catch (Exception oe) { // including RuntimeException handleException(oe);
*** 1293,1308 **** conContext.isNegotiated) { return 0; } } catch (SSLException ssle) { throw ssle; } catch (IOException ioe) { - if (!(ioe instanceof SSLException)) { throw new SSLException("readHandshakeRecord", ioe); - } else { - throw ioe; - } } } return -1; } --- 1295,1309 ---- conContext.isNegotiated) { return 0; } } catch (SSLException ssle) { throw ssle; + } catch (InterruptedIOException iioe) { + // don't change exception in case of timeouts or interrupts + throw iioe; } catch (IOException ioe) { throw new SSLException("readHandshakeRecord", ioe); } } return -1; }
*** 1359,1368 **** --- 1360,1372 ---- buffer.position() > 0) { return buffer; } } 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); } else { throw ioe;
< prev index next >