Skip to content

Commit

Permalink
Merge pull request #193 from patrickbkr/http2-multi-stream-window-upd…
Browse files Browse the repository at this point in the history
…ates

Fix HTTP2 connections with multiple streams stalling
  • Loading branch information
patrickbkr authored Aug 9, 2024
2 parents d42bd97 + d98aca1 commit 39022ce
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/Cro/HTTP2/FrameParser.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,16 @@ class Cro::HTTP2::FrameParser does Cro::Transform does Cro::ConnectionState[Cro:
stream-identifier => $sid,
conn => $packet.connection);
if $result ~~ Cro::HTTP2::Frame::Data {
unless $result.end-stream {
if $result.end-stream {
start {
my $bytes = $result.data.bytes;
$connection-state.window-size.emit:
Cro::HTTP2::Frame::WindowUpdate.new:
stream-identifier => 0,
flags => 0, increment => $bytes;
}
}
else {
start {
my $bytes = $result.data.bytes;
$connection-state.window-size.emit:
Expand Down

0 comments on commit 39022ce

Please sign in to comment.