Skip to content

Commit

Permalink
Merge pull request #3307 from gravitl/release-v0.30.0
Browse files Browse the repository at this point in the history
add config to check for reset peer udpate
  • Loading branch information
abhishek9686 authored Jan 21, 2025
2 parents 77d5705 + 557270a commit 648758c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion controllers/hosts.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"net/http"
"os"

"github.com/google/uuid"
"github.com/gorilla/mux"
Expand Down Expand Up @@ -181,7 +182,11 @@ func pull(w http.ResponseWriter, r *http.Request) {
}
}
if sendPeerUpdate {
if err := mq.PublishPeerUpdate(true); err != nil {
reset := true
if os.Getenv("RESET_PEER_UPDATE") != "" {
reset = os.Getenv("RESET_PEER_UPDATE") == "true"
}
if err := mq.PublishPeerUpdate(reset); err != nil {
logger.Log(0, "fail to publish peer update: ", err.Error())
}
}
Expand Down

0 comments on commit 648758c

Please sign in to comment.