Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2020-12-01 12:58:18 +01:00
commit 03b2b97751
3 changed files with 8 additions and 12 deletions

View File

@ -63,10 +63,9 @@ public class HTTP2ClientSession extends HTTP2Session
else
{
stream.process(frame, Callback.NOOP);
boolean closed = stream.updateClose(frame.isEndStream(), CloseState.Event.RECEIVED);
notifyHeaders(stream, frame);
if (closed)
if (stream.updateClose(frame.isEndStream(), CloseState.Event.RECEIVED))
removeStream(stream);
notifyHeaders(stream, frame);
}
}
else

View File

@ -472,10 +472,9 @@ public class HTTP2Stream extends IdleTimeout implements IStream, Callback, Dumpa
dataEntry = dataQueue.poll();
}
DataFrame frame = dataEntry.frame;
boolean closed = updateClose(frame.isEndStream(), CloseState.Event.RECEIVED);
notifyDataDemanded(this, frame, dataEntry.callback);
if (closed)
if (updateClose(frame.isEndStream(), CloseState.Event.RECEIVED))
session.removeStream(this);
notifyDataDemanded(this, frame, dataEntry.callback);
}
}

View File

@ -115,11 +115,10 @@ public class HTTP2ServerSession extends HTTP2Session implements ServerParser.Lis
}
stream.process(frame, Callback.NOOP);
boolean closed = stream.updateClose(frame.isEndStream(), CloseState.Event.RECEIVED);
if (stream.updateClose(frame.isEndStream(), CloseState.Event.RECEIVED))
removeStream(stream);
Stream.Listener listener = notifyNewStream(stream, frame);
stream.setListener(listener);
if (closed)
removeStream(stream);
}
}
}
@ -138,10 +137,9 @@ public class HTTP2ServerSession extends HTTP2Session implements ServerParser.Lis
if (stream != null)
{
stream.process(frame, Callback.NOOP);
boolean closed = stream.updateClose(frame.isEndStream(), CloseState.Event.RECEIVED);
notifyHeaders(stream, frame);
if (closed)
if (stream.updateClose(frame.isEndStream(), CloseState.Event.RECEIVED))
removeStream(stream);
notifyHeaders(stream, frame);
}
else
{