Ver código fonte

send peer update domain resolution update

abhishek9686 4 semanas atrás
pai
commit
ddad018de6
2 arquivos alterados com 4 adições e 1 exclusões
  1. 3 1
      controllers/egress.go
  2. 1 0
      controllers/hosts.go

+ 3 - 1
controllers/egress.go

@@ -141,8 +141,10 @@ func createEgress(w http.ResponseWriter, r *http.Request) {
 			}
 		}
 
+	} else {
+		go mq.PublishPeerUpdate(false)
 	}
-	go mq.PublishPeerUpdate(false)
+
 	logic.ReturnSuccessResponseWithJson(w, r, e, "created egress resource")
 }
 

+ 1 - 0
controllers/hosts.go

@@ -402,6 +402,7 @@ func hostUpdateFallback(w http.ResponseWriter, r *http.Request) {
 			e.Range = strings.Join(hostUpdate.Node.EgressGatewayRanges, ",")
 			e.Update(db.WithContext(r.Context()))
 		}
+		sendPeerUpdate = true
 	}
 
 	if sendPeerUpdate {