Skip to content

Commit 1eb0c76

Browse files
committed
Fix initialization and re-computation of expirationTimestamp in Http2ClientConnectionImpl
Closes #5865
1 parent 8c3bc97 commit 1eb0c76

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

vertx-core/src/main/java/io/vertx/core/http/impl/http2/codec/Http2ClientConnectionImpl.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ public class Http2ClientConnectionImpl extends Http2ConnectionImpl implements Ht
6262
this.authority = authority;
6363
this.lifetimeEvictionTimestamp = maxLifetime > 0 ? System.currentTimeMillis() + maxLifetime : Long.MAX_VALUE;
6464
this.handler = connHandler;
65+
// Ensure that the expirationTimestamp is initialized
66+
recycle();
6567
}
6668

6769
@Override
@@ -199,8 +201,9 @@ private void recycle() {
199201

200202
@Override
201203
void onStreamClosed(Http2Stream s) {
202-
super.onStreamClosed(s);
204+
// Prepare this connection for returning as onStreamClosed() will return it to the pool.
203205
recycle();
206+
super.onStreamClosed(s);
204207
}
205208

206209
@Override

0 commit comments

Comments
 (0)