mirror of https://github.com/docker/docs.git
fix panic when createContainer returns nil,nil
Signed-off-by: Victor Vieux <vieux@docker.com>
This commit is contained in:
parent
5146f07b83
commit
21d6fc5378
|
@ -152,7 +152,7 @@ func (c *Cluster) createContainer(config *cluster.ContainerConfig, name string,
|
||||||
engine, ok := c.engines[n.ID]
|
engine, ok := c.engines[n.ID]
|
||||||
if !ok {
|
if !ok {
|
||||||
c.scheduler.Unlock()
|
c.scheduler.Unlock()
|
||||||
return nil, nil
|
return nil, fmt.Errorf("error creating container")
|
||||||
}
|
}
|
||||||
|
|
||||||
c.pendingContainers[swarmID] = &pendingContainer{
|
c.pendingContainers[swarmID] = &pendingContainer{
|
||||||
|
|
Loading…
Reference in New Issue