From 21d6fc537891ac08a30772a92d6c8aac6bd5da1c Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Sun, 18 Oct 2015 21:22:59 -0700 Subject: [PATCH] fix panic when createContainer returns nil,nil Signed-off-by: Victor Vieux --- cluster/swarm/cluster.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cluster/swarm/cluster.go b/cluster/swarm/cluster.go index 2b518107aa..943bd1c8fe 100644 --- a/cluster/swarm/cluster.go +++ b/cluster/swarm/cluster.go @@ -152,7 +152,7 @@ func (c *Cluster) createContainer(config *cluster.ContainerConfig, name string, engine, ok := c.engines[n.ID] if !ok { c.scheduler.Unlock() - return nil, nil + return nil, fmt.Errorf("error creating container") } c.pendingContainers[swarmID] = &pendingContainer{