mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
c5769cf53b
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
|
||
---|---|---|
.. | ||
fixtures/validate_manifest | ||
metadata | ||
xfer | ||
errors.go | ||
pull.go | ||
pull_v1.go | ||
pull_v2.go | ||
pull_v2_test.go | ||
pull_v2_unix.go | ||
pull_v2_windows.go | ||
push.go | ||
push_v1.go | ||
push_v2.go | ||
registry.go | ||
registry_unit_test.go |