]> Cypherpunks repositories - gostls13.git/commit
compress/flate: move idempotent close logic to compressor
authorJoe Tsai <joetsai@digital-static.net>
Mon, 2 May 2022 18:40:57 +0000 (11:40 -0700)
committerGopher Robot <gobot@golang.org>
Mon, 2 May 2022 21:05:53 +0000 (21:05 +0000)
commita887579976c0f581ca0eb52094b2c5c63893dcdf
tree0a6af5f1557eddea3155969d0fb19c87805894c6
parent8375b54d441c9123c8d2b7343ea6cc7233b746d9
compress/flate: move idempotent close logic to compressor

The compressor methods already have logic for handling a sticky error.
Merge the logic from CL 136475 into that.

This slightly changes the error message to be more sensible
in the situation where it's returned by Flush.

Updates #27741

Change-Id: Ie34cf3164d0fa6bd0811175ca467dbbcb3be1395
Reviewed-on: https://go-review.googlesource.com/c/go/+/403514
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
src/compress/flate/deflate.go
src/compress/flate/deflate_test.go