[8u] RFR 8209333: Socket reset issue for TLS 1.3 socket close

Andrew Haley aph at redhat.com
Mon Jan 11 10:26:11 UTC 2021


On 1/11/21 4:08 AM, Andrew Hughes wrote:
> On 21:01 Fri 08 Jan     , Alvarez, David wrote:
>> Hi,
>>
>> I would like a review for 8209333. This is one of the Socket related
>> patches that were applied to OpenJDK11 after the backport of TLS 1.3 to
>> OpenJDK8
>>
>> BugId: https://bugs.openjdk.java.net/browse/JDK-8209333
>> Webrev:
>> http://cr.openjdk.java.net/~alvdavi/webrevs/8209333/webrev.8u.jdk.00/
>>
>> The only relevant differences are in SSLSocketImpl.java, as it
>> contained a java 9 try-with-resources block [1]. A
>> @SuppressWarnings("try") was needed.
>
> What warning was emitted? Is it not possible to rewrite this so
> as to avoid the warning?

Yes, I think this warning is for a real bug. Should be something like:

            if (!conContext.isInboundClosed()) {
                try {
                    // Try the best to use up the input records and close the
                    // socket gracefully, without impact the performance too
                    // much.
                    appInput.deplete();
                } finally {
                    conContext.inputRecord.close();
                }
            }

-- 
Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671



More information about the jdk8u-dev mailing list