mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #31279 from aaronlehmann/shutdown-error-leakage
Shutdown leaks an error when the container was never started
This commit is contained in:
commit
52ba250f7e
1 changed files with 4 additions and 2 deletions
|
@ -317,8 +317,10 @@ func (r *controller) Shutdown(ctx context.Context) error {
|
|||
|
||||
// remove container from service binding
|
||||
if err := r.adapter.deactivateServiceBinding(); err != nil {
|
||||
log.G(ctx).WithError(err).Errorf("failed to deactivate service binding for container %s", r.adapter.container.name())
|
||||
return err
|
||||
log.G(ctx).WithError(err).Warningf("failed to deactivate service binding for container %s", r.adapter.container.name())
|
||||
// Don't return an error here, because failure to deactivate
|
||||
// the service binding is expected if the container was never
|
||||
// started.
|
||||
}
|
||||
|
||||
if err := r.adapter.shutdown(ctx); err != nil {
|
||||
|
|
Loading…
Add table
Reference in a new issue