mirror of
https://github.com/gravitl/netmaker.git
synced 2025-02-27 01:23:00 +08:00
add conditional update of peers after a node update.
This commit is contained in:
parent
f19c114cf6
commit
0ced90ebd4
1 changed files with 5 additions and 0 deletions
|
@ -591,6 +591,11 @@ func updateNode(w http.ResponseWriter, r *http.Request) {
|
|||
if err := mq.NodeUpdate(&newNode); err != nil {
|
||||
logger.Log(1, "error publishing node update"+err.Error())
|
||||
}
|
||||
if logic.ShouldPeersUpdate(&node, &newNode) {
|
||||
if err := mq.UpdatePeers(&newnode) {
|
||||
logger.Log(1, "error publishing peer update after node update"+err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func deleteNode(w http.ResponseWriter, r *http.Request) {
|
||||
|
|
Loading…
Reference in a new issue