Skip to content

Commit 8a87df3

Browse files
authored
NetworkClientRxBuffer::clear() may not always clear (espressif#10288) (espressif#10331)
Fixes: espressif#10288
1 parent 648094c commit 8a87df3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

libraries/Network/src/NetworkClient.cpp

+6-2
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)