Ver código fonte

set proxy action based on proxy status

Abhishek Kondur 2 anos atrás
pai
commit
45ea3be347
1 arquivos alterados com 6 adições e 1 exclusões
  1. 6 1
      mq/publishers.go

+ 6 - 1
mq/publishers.go

@@ -93,7 +93,12 @@ func PublishSingleHostPeerUpdate(ctx context.Context, host *models.Host, deleted
 		return err
 	}
 	proxyUpdate.Server = servercfg.GetServer()
-	proxyUpdate.Action = models.ProxyUpdate
+	if host.ProxyEnabled {
+		proxyUpdate.Action = models.ProxyUpdate
+	} else {
+		proxyUpdate.Action = models.NoProxy
+	}
+
 	peerUpdate.ProxyUpdate = proxyUpdate
 
 	data, err := json.Marshal(&peerUpdate)