![]() A panic was seen related to the buffer being reset in one goroutine while being read in another. In the case of pigz an early cancellation will cause the reader to close, resetting the buffer and signaling the process to shut down, but races since the process must stop reading before the reset otherwise the a panic may occur. This fix guarantees that the bufio is always reset and returned to the pool on the same goroutine that is doing the read. If a buffer is not fully read the buffered reader should just be discarded and not returned back to the pool. Signed-off-by: Derek McGowan <derek@mcgstyle.net> |
||
---|---|---|
.. | ||
compression_test.go | ||
compression.go |