Skip to content

Commit

Permalink
8282600: SSLSocketImpl should not use user_canceled workaround when n…
Browse files Browse the repository at this point in the history
…ot necessary

Reviewed-by: xuelei, wetmore
  • Loading branch information
zzambers authored and jerboaa committed May 5, 2022
1 parent 81d7475 commit 7e88ff8
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -639,8 +639,12 @@ private void duplexCloseOutput() throws IOException {
if (!conContext.protocolVersion.useTLS13PlusSpec()) {
hasCloseReceipt = true;
} else {
// Use a user_canceled alert for TLS 1.3 duplex close.
useUserCanceled = true;
// Do not use user_canceled workaround if the other side has
// already half-closed the connection
if (!conContext.isInboundClosed()) {
// Use a user_canceled alert for TLS 1.3 duplex close.
useUserCanceled = true;
}
}
} else if (conContext.handshakeContext != null) { // initial handshake
// Use user_canceled alert regardless the protocol versions.
Expand Down

1 comment on commit 7e88ff8

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.