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(); }