RFR: 8326498: java.net.http.HttpClient connection leak using http/2 [v2]
Jaikiran Pai
jpai at openjdk.org
Mon Nov 17 12:20:13 UTC 2025
On Wed, 12 Nov 2025 10:16:47 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/Http2Connection.java line 2071:
>
>> 2069: peerVisibleReason.getBytes(UTF_8));
>> 2070: }
>> 2071: sendGoAway(goAway);
>
> Do we need to take `sendGoAway()` failures into account?
In its current form sendGoAway() does not throw any checked exceptions. Our general coding practice has been to not introduce try/catch block for such calls and if such methods do end up throwing some (Runtime)Exception, we fix the issue at the place where that unexpected (Runtime)Exception gets thrown or introduce a throws clause on such methods.
Having said that, if desired, I'm open to updating this line to have a try/catch for the generic `Exception` which then merely logs that the GOAWAY frame could not be enqueued.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28233#discussion_r2533844455
More information about the net-dev
mailing list