Merge pull request #1738 from wanyaoqi/bugfix/wyq/host-listen-before-register

bugfix: host listen before register
This commit is contained in:
yunion-ci-robot
2019-07-15 23:48:00 +08:00
committed by GitHub

View File

@@ -88,8 +88,11 @@ func (host *SHostService) RunService() {
hostmetrics.Start()
})
})
host.initHandlers(app)
<-hostinfo.Instance().IsRegistered // wait host and guest init
go func() {
<-hostinfo.Instance().IsRegistered // wait host and guest init
host.initHandlers(app)
}()
// Init Metadata handler
go metadata.StartService(