refresh the node specs when an unhealthy node reconnects to the cluster

Signed-off-by: mountkin <mountkin@gmail.com>
This commit is contained in:
mountkin 2015-01-19 19:27:54 +08:00
parent fda3606be3
commit d5c5df9f1b
1 changed files with 3 additions and 0 deletions

View File

@ -250,6 +250,9 @@ func (n *Node) refreshLoop() {
n.client.StopAllMonitorEvents()
n.client.StartMonitorEvents(n.handler)
n.emitCustomEvent("node_reconnect")
if err := n.updateSpecs(); err != nil {
log.Errorf("[%s/%s] Update node specs failed: %v", n.ID, n.Name, err)
}
}
n.healthy = true
}