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:
parent
4460472f4e
commit
a50d9c0765
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue