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> Upstream-commit: a50d9c0765d9861d226b323ffe190c0c99c3ac17 Component: engine
This commit is contained in:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user