Update nodeinfo in router reconfigure

This commit is contained in:
Neil Alexander 2019-01-14 18:51:49 +00:00
parent 9e186bdd67
commit 5cde3b5efc
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 7 additions and 2 deletions

View file

@ -350,7 +350,10 @@ func (a *admin) init(c *Core) {
}
var box_pub_key, coords string
if in["box_pub_key"] == nil && in["coords"] == nil {
nodeinfo := []byte(a.core.nodeinfo.getNodeInfo())
var nodeinfo []byte
a.core.router.doAdmin(func() {
nodeinfo = []byte(a.core.nodeinfo.getNodeInfo())
})
var jsoninfo interface{}
if err := json.Unmarshal(nodeinfo, &jsoninfo); err != nil {
return admin_info{}, err