Integrated: 8326498: java.net.http.HttpClient connection leak using http/2
Jaikiran Pai
jpai at openjdk.org
Tue Nov 25 11:18:03 UTC 2025
On Tue, 11 Nov 2025 12:58:04 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
> Can I please get a review for this fix which addresses a connection leak in HttpClient when dealing with HTTP/2 requests?
>
> I have added a comment in https://bugs.openjdk.org/browse/JDK-8326498 which explains what the issue is. The fix here addresses the issue by cleaning up the `Http2Connection` closing logic and centralizing it to a connection terminator. The terminator then ensures that the right resources are closed (including the underlying SocketChannel) when the termination happens.
>
> A new jtreg test has been introduced which reproduces the issue and verifies the fix.
This pull request has now been integrated.
Changeset: c19b1292
Author: Jaikiran Pai <jpai at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/c19b12927d2ac901ec8ccaa2de5897ee4c47af56
Stats: 993 lines in 10 files changed: 723 ins; 144 del; 126 mod
8326498: java.net.http.HttpClient connection leak using http/2
Reviewed-by: vyazici, djelinski, dfuchs
-------------
PR: https://git.openjdk.org/jdk/pull/28233
More information about the net-dev
mailing list