From e87cfcde5f905197aac53925bc76d946414f8d0a Mon Sep 17 00:00:00 2001 From: Julien Viet Date: Wed, 16 Nov 2022 09:12:03 +0100 Subject: [PATCH] Only create an HttpClosedException when a go away frame was received otherwise reuse the static shared instance. --- .../java/io/vertx/core/http/impl/Http2ConnectionBase.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/vertx/core/http/impl/Http2ConnectionBase.java b/src/main/java/io/vertx/core/http/impl/Http2ConnectionBase.java index 36b0950dde3..5bccdc12801 100644 --- a/src/main/java/io/vertx/core/http/impl/Http2ConnectionBase.java +++ b/src/main/java/io/vertx/core/http/impl/Http2ConnectionBase.java @@ -147,7 +147,11 @@ void onStreamWritabilityChanged(Http2Stream s) { void onStreamClosed(Http2Stream s) { VertxHttp2Stream stream = s.getProperty(streamKey); if (stream != null) { - stream.onClose(new HttpClosedException(goAwayStatus)); + if (goAwayStatus != null) { + stream.onClose(new HttpClosedException(goAwayStatus)); + } else { + stream.onClose(HttpUtils.CLOSED_EXCEPTION); + } } checkShutdown(); }