diff --git a/independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxInputStream.java b/independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxInputStream.java index 9c56278499d75..79fbca1eec094 100644 --- a/independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxInputStream.java +++ b/independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxInputStream.java @@ -18,6 +18,7 @@ import io.vertx.core.http.HttpHeaders; import io.vertx.core.http.HttpServerRequest; import io.vertx.core.http.HttpServerResponse; +import io.vertx.core.http.HttpVersion; import io.vertx.core.net.impl.ConnectionBase; import io.vertx.ext.web.RoutingContext; @@ -271,6 +272,14 @@ protected ByteBuf readBlocking() throws IOException { @Override public void handle(Buffer event) { synchronized (request.connection()) { + if (event.length() == 0 && request.version() == HttpVersion.HTTP_2) { + // When using HTTP/2 H2, this indicates that we won't receive anymore data. + eof = true; + if (waiting) { + request.connection().notifyAll(); + } + return; + } if (input1 == null) { input1 = event; } else {