Skip to content

Commit

Permalink
Merge pull request #188 from leehinman/flush_fix
Browse files Browse the repository at this point in the history
remove state change after Flush
  • Loading branch information
pierrec committed Jun 15, 2022
2 parents 885e900 + 8582079 commit c3eaa1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion writer.go
Expand Up @@ -153,7 +153,7 @@ func (w *Writer) Flush() (err error) {
default:
return nil
}
defer w.state.nextd(&err)

if w.idx > 0 {
// Flush pending data, disable w.data freeing as it is done later on.
if err = w.write(w.data[:w.idx], false); err != nil {
Expand Down

0 comments on commit c3eaa1e

Please sign in to comment.