Skip to content

Commit

Permalink
Merge pull request #546 from gravitl/pull_fix_v0.20.6
Browse files Browse the repository at this point in the history
fix sync, update host settings on pull
  • Loading branch information
abhishek9686 authored Aug 17, 2023
2 parents 057460c + 40c2ccd commit 2d45787
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 2d45787

Please sign in to comment.