45a13ca31155349759eb80a7e2058edd2d8db40c
`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> Upstream-commit: e273445dd407df6803d7b80863b644a6cfa2c1f5 Component: engine
Description
No description provided
Languages
Go
92%
Shell
5.5%
Dockerfile
1.1%
Go-Checksums
0.9%
Makefile
0.3%
Other
0.2%