diff --git a/controllers/hosts.go b/controllers/hosts.go index a1015cf95..1346b6543 100644 --- a/controllers/hosts.go +++ b/controllers/hosts.go @@ -5,6 +5,7 @@ import ( "errors" "fmt" "net/http" + "os" "github.com/google/uuid" "github.com/gorilla/mux" @@ -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()) } }