moby--moby/distribution
Aaron Lehmann e273445dd4 Fix panic on network timeout during push
`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>
2016-01-29 14:34:50 -08:00
..
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 Fix panic on network timeout during push 2016-01-29 14:34:50 -08:00
push_v1.go
push_v2.go Fix panic on network timeout during push 2016-01-29 14:34:50 -08:00
registry.go Set idle timeouts for HTTP reads and writes in communications with the registry 2016-01-26 12:40:39 -08:00
registry_unit_test.go