fix ssh update

This commit is contained in:
Martin Geno 2017-07-06 09:17:19 +02:00
parent 1a7989a24e
commit 3540b638f6
No known key found for this signature in database
GPG Key ID: F0D39A37E925E941
1 changed files with 2 additions and 1 deletions

View File

@ -89,6 +89,7 @@ func (nodes *Nodes) UpdateNode(node *Node) {
nodes.Lock()
defer nodes.Unlock()
if n, ok := nodes.List[node.NodeID]; ok {
node.Address = n.Address
go node.SSHUpdate(nodes.ssh, nodes.iface, n)
}
nodes.List[node.NodeID] = node
@ -100,7 +101,7 @@ func (nodes *Nodes) Updater() {
defer nodes.Unlock()
for nodeid, node := range nodes.List {
if n, ok := nodes.Current[nodeid]; ok {
go n.SSHUpdate(nodes.ssh, nodes.iface, node)
go node.SSHUpdate(nodes.ssh, nodes.iface, n)
}
}
log.Log.Debug("updater per ssh runs")