Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b985224

Browse filesBrowse files
Jason2866TD-er
andauthored
NetworkClientRxBuffer::clear() may not always clear
Co-authored-by: TD-er <gijs.noorlander@gmail.com>
1 parent 4a25498 commit b985224
Copy full SHA for b985224

File tree

Expand file treeCollapse file tree

1 file changed

+6
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-2
lines changed

‎libraries/Network/src/NetworkClient.cpp

Copy file name to clipboardExpand all lines: libraries/Network/src/NetworkClient.cpp
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,13 @@ class NetworkClientRxBuffer {
148148

149149
void clear() {
150150
if (r_available()) {
151-
fillBuffer();
151+
_pos = _fill;
152+
while (fillBuffer()) {
153+
_pos = _fill;
154+
}
152155
}
153-
_pos = _fill;
156+
_pos = 0;
157+
_fill = 0;
154158
}
155159
};
156160

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.