mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-09 06:35:23 +08:00
Merge pull request #3307 from gravitl/release-v0.30.0
add config to check for reset peer udpate
This commit is contained in:
commit
648758cfe5
1 changed files with 6 additions and 1 deletions
|
@ -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())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue