We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fbaa136 commit f38c1a3Copy full SHA for f38c1a3
msgpack/fallback.py
@@ -289,8 +289,13 @@ def feed(self, next_bytes):
289
view = _get_data_from_buffer(next_bytes)
290
if (len(self._buffer) - self._buff_i + len(view) > self._max_buffer_size):
291
raise BufferFull
292
- del self._buffer[:self._buff_i]
293
- self._buff_i = 0
+
+ # Strip buffer before checkpoint before reading file.
294
+ if self._buf_checkpoint > 0:
295
+ del self._buffer[:self._buf_checkpoint]
296
+ self._buff_i -= self._buf_checkpoint
297
+ self._buf_checkpoint = 0
298
299
self._buffer += view
300
301
def _consume(self):
0 commit comments