Explorar o código

Fix data race in libcontainerd

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
(cherry picked from commit 8e9fbc8f5fc5759eb7f26ec998f227994ff6c642)
Signed-off-by: Tibor Vass <tibor@docker.com>
Kenfe-Mickael Laventure %!s(int64=9) %!d(string=hai) anos
pai
achega
ec03307eb2
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      libcontainerd/remote_linux.go

+ 1 - 1
libcontainerd/remote_linux.go

@@ -143,8 +143,8 @@ func (r *remote) handleConnectionChange() {
 					transientFailureCount = 0
 					if utils.IsProcessAlive(r.daemonPid) {
 						utils.KillProcess(r.daemonPid)
-						<-r.daemonWaitCh
 					}
+					<-r.daemonWaitCh
 					if err := r.runContainerdDaemon(); err != nil { //FIXME: Handle error
 						logrus.Errorf("error restarting containerd: %v", err)
 					}