On Wed, 26 Nov 2025 12:42:34 GMT, Volkan Yazici <[email protected]> wrote:

>> Yes - but if it happens here then the exchange will have been added to 
>> `exchanges` and therefore the Http3Connection will close it. It might not 
>> get marked as unprocessed and retried in that case - but that's a smaller 
>> issue. That's what I was trying to say in the comment stating that we need 
>> to double-check if the connection is still opened *after* having added the 
>> exchange to the exchange map. It is not an issue if the exchange is 
>> closed/cancelled more than once. The first call wins :-).
>
> `registerAndStartExchange()` is only called from `createHttp3ExchangeImpl()`, 
> where there is the block holding the lock, just before the 
> `registerAndStartExchange()` invocation. Would it be a good idea to obtain 
> the `isOpen()` value there and pass it to `registerAndStartExchange()`?

No - as I said we need to do the check after updating the `exchanges` map - so 
specifically after this line:

exchanges.put(streamId, exchange);

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28494#discussion_r2565712867

Reply via email to