]> Cypherpunks repositories - gostls13.git/commit
compress/flate: forward upstream Writer errors
authorKlaus Post <klauspost@gmail.com>
Thu, 10 Mar 2016 15:46:25 +0000 (16:46 +0100)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 10 Mar 2016 17:46:46 +0000 (17:46 +0000)
commit53900cea1b0e603b36ed533e012f86e95d2144b5
treecf82a4a93d3b5218512301372ae148ec7173afa6
parentac1608a2f96afdc372aeb9553c54347bcd4cb0b6
compress/flate: forward upstream Writer errors

If the upstream writer has returned an error, it may not
be returned by subsequent calls.

This makes sure that if an error has been returned, the
Writer will keep returning an error on all subsequent calls,
and not silently "swallow" them.

Change-Id: I2c9f614df72e1f4786705bf94e119b66c62abe5e
Reviewed-on: https://go-review.googlesource.com/20515
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
src/compress/flate/deflate.go
src/compress/flate/writer_test.go