Browse code

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 authored on 2016/07/14 02:04:42
Showing 1 changed files
... ...
@@ -143,8 +143,8 @@ func (r *remote) handleConnectionChange() {
143 143
 					transientFailureCount = 0
144 144
 					if utils.IsProcessAlive(r.daemonPid) {
145 145
 						utils.KillProcess(r.daemonPid)
146
-						<-r.daemonWaitCh
147 146
 					}
147
+					<-r.daemonWaitCh
148 148
 					if err := r.runContainerdDaemon(); err != nil { //FIXME: Handle error
149 149
 						logrus.Errorf("error restarting containerd: %v", err)
150 150
 					}