diff options
author | Stephen J Day <stephen.day@docker.com> | 2016-07-25 14:52:27 -0700 |
---|---|---|
committer | Stephen J Day <stephen.day@docker.com> | 2016-07-25 18:31:24 -0700 |
commit | d99c6b837ffd18ffe5bce801feb4936bf0edd2aa (patch) | |
tree | 865dad86ff222c18f5c25a6bf12afad9225712a8 /distribution/errors.go | |
parent | 8c7468bf3b5f828503b1e284475d2f3c6f1cdd63 (diff) | |
download | docker-d99c6b837ffd18ffe5bce801feb4936bf0edd2aa.tar.gz |
swarm/controller: allow cancellation to propagate
Ensure that cancellation of a pull propagates rather than continuing to
container creation. This ensures that the `Prepare` method is properly
re-entrant.
Signed-off-by: Stephen J Day <stephen.day@docker.com>
Diffstat (limited to 'distribution/errors.go')
-rw-r--r-- | distribution/errors.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/distribution/errors.go b/distribution/errors.go index a9a17bd261..1e7630e380 100644 --- a/distribution/errors.go +++ b/distribution/errors.go @@ -40,7 +40,11 @@ type fallbackError struct { // Error renders the FallbackError as a string. func (f fallbackError) Error() string { - return f.err.Error() + return f.Cause().Error() +} + +func (f fallbackError) Cause() error { + return f.err } // shouldV2Fallback returns true if this error is a reason to fall back to v1. |