log the heartbeat send/recieve/miss

This commit is contained in:
Murali Reddy committed 2018-09-21 16:45:47 +05:30
1 parent 3c67c3c5f1
commit 62758ca337
2 files changed
+14 -1

No files matched your search

+2
View File
@@ -336,11 +336,13 @@ func (fwd *overlaySwitchForwarder) healthCheck(index int, healthy bool) {
defer fwd.lock.Unlock()
if healthy == true && fwd.forwarders[index].onHold {
log.Debug(fwd.logPrefix(), "Adding "+fwd.forwarders[index].overlayName+" to the list of forwarders")
fwd.forwarders[index].onHold = false
fwd.chooseBest()
}
if healthy == false && !fwd.forwarders[index].onHold {
log.Debug(fwd.logPrefix(), "Removing "+fwd.forwarders[index].overlayName+" from the list of forwarders")
fwd.forwarders[index].onHold = true
fwd.chooseBest()
}