Merge pull request #3308 from gravitl/master

Master
This commit is contained in:
Abhishek K 2025-01-21 09:29:22 +05:30 committed by GitHub
commit 7029b0318b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5,6 +5,7 @@ import (
"errors" "errors"
"fmt" "fmt"
"net/http" "net/http"
"os"
"github.com/google/uuid" "github.com/google/uuid"
"github.com/gorilla/mux" "github.com/gorilla/mux"
@ -181,7 +182,11 @@ func pull(w http.ResponseWriter, r *http.Request) {
} }
} }
if sendPeerUpdate { 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()) logger.Log(0, "fail to publish peer update: ", err.Error())
} }
} }