bugfix: line_buffer

This commit is contained in:
Raphael Robatsch 2021-10-30 11:21:30 +02:00
parent e2c4eb6185
commit ea5ab9e28b

View File

@ -60,7 +60,7 @@ private:
_discardLine = true;
_consumedTo = _buffer.begin();
_bufferedTo = _buffer.begin();
} else if (bytesRemaining > 0 && _consumedTo > _buffer.begin()) {
} else {
// move the last partial message to the front of the buffer, so a full-sized
// message will fit
std::copy(_consumedTo, _bufferedTo, _buffer.begin());