On Fri, 28 Aug 2026 08:20:35 GMT, Volkan Yazici <[email protected]> wrote:
>> src/java.net.http/share/classes/jdk/internal/net/http/Http3Connection.java >> line 907: >> >>> 905: setFinalStream(); >>> 906: return false; >>> 907: } >> >> In Http3Connection the idleConnectionTimeoutEvent is volatile - so please >> add a local variable to not read it more than once (or investigate whether >> the `volatile` keyword could/should be removed). >> Also it seems here we should also simply call handle() on the event if the >> timeout has expired and let the rest of the method unfold. > > Fixed the `volatile` issue in a8162a4e930. > > Using `Http3Connection.IdleConnectionTimeoutEvent#handle()` has the same > problem I've shared earlier for H2: connection gets terminated while the lock > is still held. Are you sure about this change? > > FWIW, when I change the code in the way you suggested, the newly added tests > still pass. Good point again. Holding the lock while doing this might not be a good idea. Now that I think about it, I guess that your reasoning was that the event would eventually fire and terminate the connection later? So your concern was just to prevent it from being reused? Then maybe we need to double check that the connection is still idle before marking it finalStream. Then just let the event alone and return false and the event will eventually fire and do its job. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/32545#discussion_r3879447790
