|
@@ -502,7 +502,7 @@ func updateExtClient(w http.ResponseWriter, r *http.Request) {
|
|
if ingressNode, err := logic.GetNodeByID(newclient.IngressGatewayID); err == nil {
|
|
if ingressNode, err := logic.GetNodeByID(newclient.IngressGatewayID); err == nil {
|
|
if ingressHost, err := logic.GetHost(ingressNode.HostID.String()); err == nil {
|
|
if ingressHost, err := logic.GetHost(ingressNode.HostID.String()); err == nil {
|
|
if replaceOldClient || !update.Enabled {
|
|
if replaceOldClient || !update.Enabled {
|
|
- mq.BroadcastDelExtClient(ingressHost, &ingressNode, currentClient)
|
|
|
|
|
|
+ mq.BroadcastDelExtClient(ingressHost, &ingressNode, []models.ExtClient{currentClient})
|
|
}
|
|
}
|
|
if replaceOldClient || changedEnabled {
|
|
if replaceOldClient || changedEnabled {
|
|
// broadcast update
|
|
// broadcast update
|
|
@@ -588,13 +588,12 @@ func deleteExtClient(w http.ResponseWriter, r *http.Request) {
|
|
go func() {
|
|
go func() {
|
|
ingressHost, err := logic.GetHost(ingressnode.HostID.String())
|
|
ingressHost, err := logic.GetHost(ingressnode.HostID.String())
|
|
if err == nil {
|
|
if err == nil {
|
|
- go mq.BroadcastDelExtClient(ingressHost, &ingressnode, extclient)
|
|
|
|
|
|
+ mq.BroadcastDelExtClient(ingressHost, &ingressnode, []models.ExtClient{extclient})
|
|
f, err := logic.GetFwUpdate(ingressHost)
|
|
f, err := logic.GetFwUpdate(ingressHost)
|
|
if err == nil {
|
|
if err == nil {
|
|
mq.PublishFwUpdate(ingressHost, &f)
|
|
mq.PublishFwUpdate(ingressHost, &f)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
if err = mq.PublishDeleteExtClientDNS(&extclient); err != nil {
|
|
if err = mq.PublishDeleteExtClientDNS(&extclient); err != nil {
|
|
logger.Log(1, "error publishing dns update for extclient deletion", err.Error())
|
|
logger.Log(1, "error publishing dns update for extclient deletion", err.Error())
|
|
}
|
|
}
|