Add if judgment before receiving operations on daemonWaitCh

receive operations on a nil channel will always block, this lead containerd not started.

Signed-off-by: Shukui Yang <yangshukui@huawei.com>
This commit is contained in:
Shukui Yang 2018-03-21 05:37:36 -04:00
parent 4460472f4e
commit a50d9c0765

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)