Merge pull request #36651 from keloyang/judgment-daemonWaitCh

Add if judgment before receiving operations on daemonWaitCh
Upstream-commit: b6a7d027e99d4416489b829307f2ad57ba52ada7
Component: engine
This commit is contained in:
Vincent Demeester
2018-03-28 10:07:57 +02:00
committed by GitHub

View File

@ -307,7 +307,9 @@ func (r *remote) monitorConnection(monitor *containerd.Client) {
<-time.After(100 * time.Millisecond)
system.KillProcess(r.daemonPid)
}
<-r.daemonWaitCh
if r.daemonWaitCh != nil {
<-r.daemonWaitCh
}
monitor.Close()
os.Remove(r.GRPC.Address)