Skip to content

Initialize the HTTP/2 client connection expiration timestamp before recycle gets called#5585

Merged
vietj merged 1 commit into4.xfrom
handle-http2-client-keep-alive-timer-when-no-streams
Jun 2, 2025
Merged

Initialize the HTTP/2 client connection expiration timestamp before recycle gets called#5585
vietj merged 1 commit into4.xfrom
handle-http2-client-keep-alive-timer-when-no-streams

Conversation

@vietj
Copy link
Member

@vietj vietj commented Jun 2, 2025

Motivation:

The HTTP/2 client connection sets the connection expiration timestamp when the connection is recycled, assuming it will have at least one stream created.

When no streams is created, the expiration timestamp is not set and the connection is not recycled by the pool.

Changes:

Set the connection expiration timestamp in the connection constructor.

…ecycle gets called.

Motivation:

The HTTP/2 client connection sets the connection expiration timestamp when the connection is recycled, assuming it will have at least one stream created.

When no streams is created, the expiration timestamp is not set and the connection is not recycled by the pool.

Changes:

Set the connection expiration timestamp in the connection constructor.
@vietj vietj added this to the 4.5.16 milestone Jun 2, 2025
@vietj vietj added the bug label Jun 2, 2025
@vietj vietj linked an issue Jun 2, 2025 that may be closed by this pull request
@vietj vietj merged commit 60bf067 into 4.x Jun 2, 2025
7 checks passed
@vietj vietj deleted the handle-http2-client-keep-alive-timer-when-no-streams branch June 2, 2025 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some Http2ClientConnections remain open despite the Http2KeepAliveTimeout

1 participant