diff --git a/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Session.java b/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Session.java index eeea767b3a6..3f3353a818f 100644 --- a/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Session.java +++ b/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Session.java @@ -119,7 +119,7 @@ public abstract class HTTP2Session implements ISession, Parser.Listener stream.updateClose(frame.isEndStream(), false); final int length = frame.remaining(); flowControl.onDataReceived(this, stream, length); - return stream.process(frame, new Callback.Adapter() + boolean result = stream.process(frame, new Callback.Adapter() { @Override public void succeeded() @@ -127,6 +127,9 @@ public abstract class HTTP2Session implements ISession, Parser.Listener flowControl.onDataConsumed(HTTP2Session.this, stream, length); } }); + if (stream.isClosed()) + removeStream(stream, false); + return result; } else {