RFR: 8326498: java.net.http.HttpClient connection leak using http/2 [v2]
Daniel Fuchs
dfuchs at openjdk.org
Wed Nov 12 12:52:22 UTC 2025
On Wed, 12 Nov 2025 09:00:35 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:
>> Jaikiran Pai has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - mark jdk.internal.net.http.Http2Connection as Closable
>> - reduce number of concurrent requests
>
> src/java.net.http/share/classes/jdk/internal/net/http/Exchange.java line 715:
>
>> 713: if (t != null) {
>> 714: if (!cached)
>> 715: c.close();
>
> We remove the `if (!cached) c.close()` logic. Where do we restore this functionality? If not, why not?
If the terminationException is not null the connection is already closed (or being closed by another thread) so there's no need to call close() again.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28233#discussion_r2518187028
More information about the net-dev
mailing list