Skip to content

Commit 6e68abe

Browse files
authored
Merge pull request #333 from link2xt/link2xt/internal-flush
fix(flate encoder): do not mark internal state as flushed if we ran out of buffer space
2 parents c695fc2 + a21d8a2 commit 6e68abe

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)