Skip to content

Commit

Permalink
7498 Locally half-closed streams needs to be able to receive frames
Browse files Browse the repository at this point in the history
  • Loading branch information
danielkec committed Aug 30, 2023
1 parent a268323 commit cdb0e04
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,10 @@ private void dataFrame() {
// TODO buffer now contains the actual data bytes
stream.stream().data(frameHeader, buffer);

if (frameHeader.flags(Http2FrameTypes.DATA).endOfStream()
&& (REMOVABLE_STREAMS.contains(stream.stream.streamState()))) {
// 5.1 - In HALF-CLOSED state we need to wait for either RST-STREAM or DATA with endStream flag
// even when handler has already finished
if ((REMOVABLE_STREAMS.contains(stream.stream.streamState()))
&& frameHeader.flags(Http2FrameTypes.DATA).endOfStream()) {
streams.remove(streamId);
}

Expand Down Expand Up @@ -855,7 +857,7 @@ public void run() {
throw e;
}
} finally {
//5.1 - In HALF-CLOSED state we need to wait for either RST-STREAM or DATA with endStream flag
// 5.1 - In HALF-CLOSED state we need to wait for either RST-STREAM or DATA with endStream flag
if (stream.streamState() == Http2StreamState.CLOSED) {
streams.remove(stream.streamId());
}
Expand Down

0 comments on commit cdb0e04

Please sign in to comment.