Lock state before we modify.
When we start a container we lock state, we should do the same in stop. Detected via -race. Upstream-commit: d7e2fc898284fe29ed43f7b28eae56e7e052e854 Component: engine
This commit is contained in:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user