On Fri, 14 Jul 2023 14:16:00 GMT, Matthew Donovan <[email protected]> wrote:

> TransportContext also has a `protocolVersion` field. Is it possible to just 
> use that instead?

Did you mean a change in duplexCloseOutput() like the following?


-           // The protocol version may have been negotiated.
-           ProtocolVersion pv = conContext.handshakeContext.negotiatedProtocol;
+           // The protocol version may have been negotiated.  The 
+           // conContext.handshakeContext.negotiatedProtocol is not used as 
there
+           // may be a race to set it to null.
+          ProtocolVersion pv = conContext.protocolVersion;
            if (pv == null || (!pv.useTLS13PlusSpec())) {
                hasCloseReceipt = true;
            }       


I like the idea as it looks like a safe update in the current implementation.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13742#discussion_r1263934419

Reply via email to