Lock concurrent access to remove map during Daemon restore
Signed-off-by: Darren Stahl <darst@microsoft.com> Upstream-commit: d665ca8dc053838c5d4d284e13c0f166cd51df6b 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