Skip to content

Commit a21d8a2

Browse files
committed
fix(flate encoder): do not mark internal state as flushed if we ran out of output buffer space
1 parent f3e9742 commit a21d8a2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/codec/flate/encoder.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@ impl Encode for FlateEncoder {
8383
}
8484
}
8585

86-
self.flushed = true;
87-
Ok(!output.unwritten().is_empty())
86+
let internal_flushed = !output.unwritten().is_empty();
87+
self.flushed = internal_flushed;
88+
Ok(internal_flushed)
8889
}
8990

9091
fn finish(

0 commit comments

Comments
 (0)