moby--moby/graph
Josh Hawn d80c4244d3 [graph] Use a pipe for downloads to write progress
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)
2015-08-05 18:13:39 -07:00
..
tags Documentation improvements and code cleanups for graph package 2015-07-30 14:27:10 -07:00
export.go Documentation improvements and code cleanups for graph package 2015-07-30 14:27:10 -07:00
graph.go Merge pull request #15252 from coolljt0725/14765_enable_golint_3 2015-08-05 19:27:48 -04:00
graph_test.go Replace GenerateRandomID with GenerateNonCryptoID 2015-07-28 22:31:01 -07:00
graph_unix.go Merge pull request #15252 from coolljt0725/14765_enable_golint_3 2015-08-05 19:27:48 -04:00
graph_windows.go Merge pull request #15252 from coolljt0725/14765_enable_golint_3 2015-08-05 19:27:48 -04:00
history.go Documentation improvements and code cleanups for graph package 2015-07-30 14:27:10 -07:00
import.go Merge pull request #15252 from coolljt0725/14765_enable_golint_3 2015-08-05 19:27:48 -04:00
list.go Fix uses of "int" where "int64" should be used instead 2015-07-31 16:31:40 -07:00
load.go Documentation improvements and code cleanups for graph package 2015-07-30 14:27:10 -07:00
load_unsupported.go /graph fix lin errors/warnings 2015-07-29 20:59:36 +00:00
mutex.go Attempt to protect on disk image store with mutex 2015-06-25 20:16:37 -07:00
pools_test.go don't call reexec.Init from chrootarchive 2014-11-25 01:03:40 +02:00
pull.go Documentation improvements and code cleanups for graph package 2015-07-30 14:27:10 -07:00
pull_v1.go Fix uses of "int" where "int64" should be used instead 2015-07-31 16:31:40 -07:00
pull_v2.go [graph] Use a pipe for downloads to write progress 2015-08-05 18:13:39 -07:00
push.go Documentation improvements and code cleanups for graph package 2015-07-30 14:27:10 -07:00
push_v1.go Fix uses of "int" where "int64" should be used instead 2015-07-31 16:31:40 -07:00
push_v2.go Fix uses of "int" where "int64" should be used instead 2015-07-31 16:31:40 -07:00
registry.go Documentation improvements and code cleanups for graph package 2015-07-30 14:27:10 -07:00
service.go Documentation improvements and code cleanups for graph package 2015-07-30 14:27:10 -07:00
tags.go Documentation improvements and code cleanups for graph package 2015-07-30 14:27:10 -07:00
tags_unit_test.go Documentation improvements and code cleanups for graph package 2015-07-30 14:27:10 -07:00