From 2b86d34d5ac05035180c850d79b512145a9046d8 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Fri, 13 Jun 2014 23:03:17 +0200 Subject: [PATCH] Properly closing the stream and eventually removing it when receiving data frames. --- .../src/main/java/org/eclipse/jetty/http2/HTTP2Session.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 {