将健康检查连续下线次数从1升级为3/修复健康检查可能导致DNS不断同步的问题

This commit is contained in:
GoEdgeLab
2021-08-29 16:01:31 +08:00
parent fc7218c4f2
commit ff666a8621
4 changed files with 47 additions and 11 deletions

View File

@@ -1098,9 +1098,11 @@ func (this *NodeDAO) UpdateNodeUpCount(tx *dbs.Tx, nodeId int64, isUp bool, maxU
return false, err
}
err = this.NotifyDNSUpdate(tx, nodeId)
if err != nil {
return false, err
if changed {
err = this.NotifyDNSUpdate(tx, nodeId)
if err != nil {
return true, err
}
}
return