restart the event monitor when unhealthy node comes back

Signed-off-by: mountkin <mountkin@gmail.com>
This commit is contained in:
mountkin 2015-01-09 19:42:35 +08:00
parent a0901ce8d6
commit a3f0c1643f
1 changed files with 2 additions and 0 deletions

View File

@ -243,6 +243,8 @@ func (n *Node) refreshLoop() {
} else {
if !n.healthy {
log.Infof("[%s/%s] Node came back to life. Hooray!", n.ID, n.Name)
n.client.StopAllMonitorEvents()
n.client.StartMonitorEvents(n.handler)
}
n.healthy = true
}