On Thu, 29 Jan 2026 18:17:59 GMT, Daniel Fuchs <[email protected]> wrote:

>> test/jdk/java/net/httpclient/lib/jdk/httpclient/test/lib/http3/Http3ServerStreamImpl.java
>>  line 368:
>> 
>>> 366:         @Override
>>> 367:         public void close() throws IOException {
>>> 368:             if (closeReason.getAndSet(Boolean.TRUE) == Boolean.TRUE) 
>>> return;
>> 
>> Shouldn't this be `!compareAndSet(null, TRUE)`? Otherwise we allow changing 
>> the state from `FAILED` to `CLOSED`, which, AFAICT, is not intended.
>
> If it fails, and then you call close(), then it should be closed, regardless 
> on whether it failed before?

Right. Also, read after close may be a user error, so I think we want to report 
that.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29448#discussion_r2745303774

Reply via email to