Skip to content

Commit

Permalink
NetworkClientRxBuffer::clear() may not always clear (#10288) (#10331)
Browse files Browse the repository at this point in the history
Fixes: #10288
  • Loading branch information
TD-er authored Sep 13, 2024
1 parent 648094c commit 8a87df3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions libraries/Network/src/NetworkClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,13 @@ class NetworkClientRxBuffer {

void clear() {
if (r_available()) {
fillBuffer();
_pos = _fill;
while (fillBuffer()) {
_pos = _fill;
}
}
_pos = _fill;
_pos = 0;
_fill = 0;
}
};

Expand Down

0 comments on commit 8a87df3

Please sign in to comment.