Skip to content

Commit

Permalink
protobuf/echo/ProtoMessageReceiver: Propagate amount streamed to the …
Browse files Browse the repository at this point in the history
…whole stack
  • Loading branch information
richardapeters committed Nov 14, 2023
1 parent d1418ac commit 386a6c3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions protobuf/echo/ProtoMessageReceiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,15 @@ namespace services

if (&current != &stack.front())
{
current.first -= available - limitedReader.Available();
for (auto& i : stack)
{
i.first -= available - limitedReader.Available();

if (&i == &current)
break;
}

if (current.first == 0)
while (stack.size() > 1 && stack.back().first == 0)
stack.pop_back();
}
}
Expand Down

0 comments on commit 386a6c3

Please sign in to comment.