Skip to content

Commit

Permalink
fix sync, update host settings
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek9686 committed Aug 17, 2023
1 parent 41a4298 commit 40c2ccd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions functions/mqhandlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ func HostUpdate(client mqtt.Client, msg mqtt.Message) {
clearRetainedMsg(client, msg.Topic()) // clear message
UpdateKeys()
case models.RequestPull:
clearRetainedMsg(client, msg.Topic())
Pull(true)
default:
slog.Error("unknown host action", "action", hostUpdate.Action)
Expand Down
1 change: 1 addition & 0 deletions functions/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func Pull(restart bool) error {
pullResponse.ServerConfig.MQPassword = server.MQPassword // pwd can't change currently
config.UpdateServerConfig(&pullResponse.ServerConfig)
config.SetNodes(pullResponse.Nodes)
config.UpdateHost(&pullResponse.Host)
fmt.Printf("completed pull for server %s\n", serverName)
_ = config.WriteServerConfig()
_ = config.WriteNetclientConfig()
Expand Down

0 comments on commit 40c2ccd

Please sign in to comment.