On Mon, 10 Aug 2026 14:03:07 GMT, Daniel Fuchs <[email protected]> wrote:

>> Jaikiran Pai has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   read incomingGoAway just once
>
> src/java.net.http/share/classes/jdk/internal/net/http/Http2Connection.java 
> line 2080:
> 
>> 2078:                         ? terminationCause
>> 2079:                         : 
>> Http2TerminationCause.inferFromGoAway(terminationCause,
>> 2080:                         incomingGoAway.errorCode);
> 
> Given that the `incomingGoaway` variable is volatile and can be set outside 
> of the `stateLock` we should really read it only once in the body of this 
> method. Since we only read it, I would suggest something like:
> 
>     var  incomingGoaway = this.incomingGoaway;

Good catch. I've updated the PR with the change.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32278#discussion_r3750970429

Reply via email to