Explorar o código

Merge pull request #19917 from WeiZhang555/add-lock

Lock container when set state to restarting
Alexander Morozov %!s(int64=9) %!d(string=hai) anos
pai
achega
67d6154cc2
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      container/monitor.go

+ 1 - 1
container/monitor.go

@@ -218,7 +218,7 @@ func (m *containerMonitor) start() error {
 		m.resetMonitor(err == nil && exitStatus.ExitCode == 0)
 
 		if m.shouldRestart(exitStatus.ExitCode) {
-			m.container.SetRestarting(&exitStatus)
+			m.container.SetRestartingLocking(&exitStatus)
 			m.logEvent("die")
 			m.resetContainer(true)