e273445dd4
`Upload` already closes the reader returned by `compress` and the progressreader passed into it, before returning. But even so, the io.Copy inside compress' goroutine needs to attempt a read from the progressreader to notice that it's closed, and this read has a side effect of outputting a progress message. If this happens after `Upload` returns, it can result in a write to a closed channel. Change `compress` to return a channel that allows the caller to wait for its goroutine to finish before freeing any resources connected to the reader that was passed to it. Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com> |
||
---|---|---|
.. | ||
fixtures/validate_manifest | ||
metadata | ||
xfer | ||
pull.go | ||
pull_v1.go | ||
pull_v2.go | ||
pull_v2_test.go | ||
pull_v2_unix.go | ||
pull_v2_windows.go | ||
push.go | ||
push_v1.go | ||
push_v2.go | ||
registry.go | ||
registry_unit_test.go |