Merge pull request #26124 from darrenstahlmsft/RestoreLock

Lock concurrent access to remove map during Daemon restore
Upstream-commit: 4e1eb10cf28c109ca887408155d84a847aa233fc
Component: engine
This commit is contained in:
Vincent Demeester
2016-08-30 13:06:01 +02:00
committed by GitHub

View File

@ -201,7 +201,9 @@ func (daemon *Daemon) restore() error {
restartContainers[c] = make(chan struct{})
mapLock.Unlock()
} else if c.HostConfig != nil && c.HostConfig.AutoRemove {
mapLock.Lock()
removeContainers[c.ID] = c
mapLock.Unlock()
}
}