RFR: 8318492: Http2ClientImpl should attempt to close and remove connection in stop()
Jaikiran Pai
jpai at openjdk.org
Wed Oct 25 12:08:28 UTC 2023
On Tue, 24 Oct 2023 09:46:40 GMT, Conor Cleary <ccleary at openjdk.org> wrote:
> If Http2ClientImpl::stop() is called, it will loop through the connections map and call the close() method on each connection. The changes in this PR make sure that the connection thread (where close is called from) removes the `Http2Connection` from the connection pool to prevent inactive connections from remaining in there rather than just closing it.
>
> Even though the connection can be and usually is removed from the pool in other places (reader or writer thread), this change ensures removal from the pool in cases where the connection is shutdown by an exception, reset, etc. The issue was first spotted when a RST_STREAM triggered repeated attempts to remove idle connections from the pool before a regular shutdown could occur.
Marked as reviewed by jpai (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/16340#pullrequestreview-1697129938
More information about the net-dev
mailing list