Skip to content

Commit e0df732

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

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public class Http2ClientConnectionImpl extends Http2ConnectionImpl implements Ht
6161
this.options = options;
6262
this.authority = authority;
6363
this.lifetimeEvictionTimestamp = maxLifetime > 0 ? System.currentTimeMillis() + maxLifetime : Long.MAX_VALUE;
64+
this.expirationTimestamp = Long.MAX_VALUE; // will be initialized on first recycle of the connection
6465
this.handler = connHandler;
6566
}
6667

@@ -199,8 +200,9 @@ private void recycle() {
199200

200201
@Override
201202
void onStreamClosed(Http2Stream s) {
202-
super.onStreamClosed(s);
203+
// Prepare this connection for returning as onStreamClosed() will return it to the pool.
203204
recycle();
205+
super.onStreamClosed(s);
204206
}
205207

206208
@Override

0 commit comments

Comments
 (0)