mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
d80c4244d3
The process of pulling an image spawns a new goroutine for each layer in the image manifest. If any of these downloads fail we would stop everything and return the error, even though other goroutines would still be running and writing output through a progress reader which is attached to an http response writer. Since the request handler had already returned from the first error, the http server panics when one of these download goroutines makes a write to the response writer buffer. This patch prevents this crash in the daemon http server by waiting for all of the download goroutines to complete, even if one of them fails. Only then does it return, terminating the request handler. Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn) |
||
---|---|---|
.. | ||
tags | ||
export.go | ||
graph.go | ||
graph_test.go | ||
graph_unix.go | ||
graph_windows.go | ||
history.go | ||
import.go | ||
list.go | ||
load.go | ||
load_unsupported.go | ||
mutex.go | ||
pools_test.go | ||
pull.go | ||
pull_v1.go | ||
pull_v2.go | ||
push.go | ||
push_v1.go | ||
push_v2.go | ||
registry.go | ||
service.go | ||
tags.go | ||
tags_unit_test.go |