Properly closing the stream and eventually removing it when receiving data frames.
This commit is contained in:
parent
d4783369bc
commit
2b86d34d5a
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue