< prev index next >
src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java
Print this page
rev 52926 : 8209333: Socket reset issue for TLS 1.3 socket close
Reviewed-by: jnimeh
rev 52927 : 8221882: Use fiber-friendly java.util.concurrent.locks in JSSE
Reviewed-by: alanb, dfuchs
rev 52928 : imported patch x3-8221882-fiber_friendly_locking-SSLSocketImpl-edits.changeset
@@ -616,32 +616,29 @@
}
}
// Need a lock here so that the user_canceled alert and the
// close_notify alert can be delivered together.
- conContext.outputRecord.recordLock.lock();
- try {
try {
+ synchronized (conContext.outputRecord) {
// send a user_canceled alert if needed.
if (useUserCanceled) {
conContext.warning(Alert.USER_CANCELED);
}
// send a close_notify alert
conContext.warning(Alert.CLOSE_NOTIFY);
+ }
} finally {
if (!conContext.isOutboundClosed()) {
conContext.outputRecord.close();
}
if ((autoClose || !isLayered()) && !super.isOutputShutdown()) {
super.shutdownOutput();
}
}
- } finally {
- conContext.outputRecord.recordLock.unlock();
- }
if (!isInputShutdown()) {
bruteForceCloseInput(hasCloseReceipt);
}
}
< prev index next >