resolve merge conflicts

This commit is contained in:
Abhishek Kondur 2023-01-17 18:37:58 +05:30
commit 2ea7f077f7
3 changed files with 4 additions and 4 deletions

View file

@ -186,7 +186,7 @@ func fetchHostAcls(hostID string) []Acl {
},
{
AclType: "publishClientSend",
Topic: fmt.Sprintf("host/update/%s", hostID),
Topic: fmt.Sprintf("host/serverupdate/%s", hostID),
Priority: -1,
Allow: true,
},
@ -373,7 +373,7 @@ func fetchServerAcls() []Acl {
},
{
AclType: "publishClientReceive",
Topic: "host/update/#",
Topic: "host/serverupdate/#",
Priority: -1,
Allow: true,
},

View file

@ -141,7 +141,7 @@ func UpdateHost(client mqtt.Client, msg mqtt.Message) {
logger.Log(1, "error unmarshaling payload ", err.Error())
return
}
logger.Log(0, fmt.Sprintf("recieved host update: %+v\n", hostUpdate))
logger.Log(0, "recieved host update for host: ", id)
var sendPeerUpdate bool
switch hostUpdate.Action {
case models.UpdateHost:

View file

@ -83,7 +83,7 @@ func SetupMQTT() {
client.Disconnect(240)
logger.Log(0, "node update subscription failed")
}
if token := client.Subscribe("host/update/#", 0, mqtt.MessageHandler(UpdateHost)); token.WaitTimeout(MQ_TIMEOUT*time.Second) && token.Error() != nil {
if token := client.Subscribe("host/serverupdate/#", 0, mqtt.MessageHandler(UpdateHost)); token.WaitTimeout(MQ_TIMEOUT*time.Second) && token.Error() != nil {
client.Disconnect(240)
logger.Log(0, "host update subscription failed")
}