1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/distribution
Aaron Lehmann c5769cf53b Pull: only close temporary file once
Close could be called twice on a temporary download file, which could
have bad side effects.

This fixes the problem by setting to ld.tmpFile to nil when the download
completes sucessfully. Then the call to ld.Close will have no effect,
and only the download manager will close the temporary file when it's
done extracting the layer from it. ld.Close will be responsible for
closing the file if we hit the retry limit and there is still a partial
download present.

Fixes #21675

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit 930ae3dbcb)
2016-03-31 18:35:38 -04:00
..
fixtures/validate_manifest
metadata Changes cross-repository blob mounting to a blob Create option 2016-01-14 14:26:03 -08:00
xfer Update mount state of live containers after a daemon crash. 2016-03-31 18:35:37 -04:00
errors.go distribution: errors: do not retry if no token in response 2016-03-19 12:20:14 +01:00
pull.go Login update and endpoint refactor 2016-03-01 11:52:32 -08:00
pull_v1.go Pull: only close temporary file once 2016-03-31 18:35:38 -04:00
pull_v2.go Pull: only close temporary file once 2016-03-31 18:35:38 -04:00
pull_v2_test.go Windows CI Unit Test: Distribution turn off failing tests 2016-02-28 20:02:51 -08:00
pull_v2_unix.go Add distribution package 2015-11-24 09:40:24 -08:00
pull_v2_windows.go
push.go Login update and endpoint refactor 2016-03-01 11:52:32 -08:00
push_v1.go Pass upstream client's user agent through to registry on operations beyond pulls 2016-03-21 14:31:47 -07:00
push_v2.go Fix concurrent uploads that share layers 2016-03-01 11:14:44 -08:00
registry.go Pass upstream client's user agent through to registry on operations beyond pulls 2016-03-21 14:31:47 -07:00
registry_unit_test.go Change APIEndpoint to contain the URL in a parsed format 2016-02-17 17:48:15 -08:00