mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-26 10:10:19 +00:00
8141651: Deadlock in sun.security.ssl.SSLSocketImpl
Reviewed-by: weijun
This commit is contained in:
parent
d42e70fc3c
commit
30655cc742
@ -766,17 +766,27 @@ public final class SSLSocketImpl extends BaseSSLSocketImpl {
|
||||
// records, so this also increases robustness.
|
||||
//
|
||||
if (length > 0) {
|
||||
IOException ioe = null;
|
||||
byte description = 0; // 0: never used, make the compiler happy
|
||||
writeLock.lock();
|
||||
try {
|
||||
outputRecord.deliver(source, offset, length);
|
||||
} catch (SSLHandshakeException she) {
|
||||
// may be record sequence number overflow
|
||||
fatal(Alerts.alert_handshake_failure, she);
|
||||
description = Alerts.alert_handshake_failure;
|
||||
ioe = she;
|
||||
} catch (IOException e) {
|
||||
fatal(Alerts.alert_unexpected_message, e);
|
||||
description = Alerts.alert_unexpected_message;
|
||||
ioe = e;
|
||||
} finally {
|
||||
writeLock.unlock();
|
||||
}
|
||||
|
||||
// Be care of deadlock. Please don't place the call to fatal()
|
||||
// into the writeLock locked block.
|
||||
if (ioe != null) {
|
||||
fatal(description, ioe);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user