Lock state before we modify.
When we start a container we lock state, we should do the same in stop. Detected via -race.
This commit is contained in:
parent
2bc35287a0
commit
d7e2fc8982
1 changed files with 2 additions and 0 deletions
|
@ -1300,7 +1300,9 @@ func (container *Container) monitor() {
|
|||
}
|
||||
|
||||
// Report status back
|
||||
container.State.Lock()
|
||||
container.State.setStopped(exitCode)
|
||||
container.State.Unlock()
|
||||
|
||||
// Release the lock
|
||||
close(container.waitLock)
|
||||
|
|
Loading…
Add table
Reference in a new issue