mirror of
https://github.com/gravitl/netmaker.git
synced 2025-11-11 17:20:34 +08:00
commit
7029b0318b
1 changed files with 6 additions and 1 deletions
|
|
@ -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())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue