Browse code

Merge pull request #24593 from mlaventure/fix-libcontainerd-data-race

Fix data race in libcontainerd

Antonio Murdaca authored on 2016/07/15 00:27:24
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
 					}