Merge pull request #36651 from keloyang/judgment-daemonWaitCh

Add if judgment before receiving operations on daemonWaitCh
This commit is contained in:
Vincent Demeester 2018-03-28 10:07:57 +02:00 committed by GitHub
commit b6a7d027e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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)