Skip to content

Commit 13af82b

Browse files
committed
feat(decompression-plz): added clearing buffer logic in case of error
1 parent f566f27 commit 13af82b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

decompression-plz/src/state.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ where
124124
Ok(())
125125
}
126126
Err(mut e) => {
127+
// whatever the error clear the buf
128+
decode_struct.buf.clear();
127129
if let MultiDecompressErrorReason::Partial {
128130
ref mut partial_body,
129131
header_index,

0 commit comments

Comments
 (0)