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:
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user