codec: LinesCodec should only return MaxLineLengthExceeded once per line (#3556)

This commit is contained in:
r-zig
2021-02-25 23:21:59 +01:00
committed by GitHub
parent 017a483b5e
commit 5756a005a6
2 changed files with 20 additions and 1 deletions
+1 -1
View File
@@ -133,7 +133,7 @@ impl Decoder for LinesCodec {
buf.advance(read_to);
self.next_index = 0;
if buf.is_empty() {
return Err(LinesCodecError::MaxLineLengthExceeded);
return Ok(None);
}
}
(false, Some(offset)) => {