mirror of
https://github.com/docker/docs.git
synced 2026-04-05 02:38:52 +07:00
Avoid nil pointer dereference in (*Cluster).createContainer
Swarm.Create car return nil,nil when refresh fails due to network hiccup Signed-off-by: Mariusz Borsa <mborsa@polyverse.io>
This commit is contained in:
@@ -130,6 +130,10 @@ func (c *Cluster) createContainer(config *cluster.ContainerConfig, name string,
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if container == nil {
|
||||
return nil, errors.New("Container created but refresh didn't report it back")
|
||||
}
|
||||
|
||||
st := &state.RequestedState{
|
||||
ID: container.Id,
|
||||
Name: name,
|
||||
|
||||
Reference in New Issue
Block a user