Lock concurrent access to remove map during Daemon restore
| ... | ... |
@@ -201,7 +201,9 @@ func (daemon *Daemon) restore() error {
|
| 201 | 201 |
restartContainers[c] = make(chan struct{})
|
| 202 | 202 |
mapLock.Unlock() |
| 203 | 203 |
} else if c.HostConfig != nil && c.HostConfig.AutoRemove {
|
| 204 |
+ mapLock.Lock() |
|
| 204 | 205 |
removeContainers[c.ID] = c |
| 206 |
+ mapLock.Unlock() |
|
| 205 | 207 |
} |
| 206 | 208 |
} |
| 207 | 209 |
|