relay functionality working

This commit is contained in:
afeiszli
2021-09-16 21:49:09 -04:00
parent 61c2c5f0a0
commit 31ea969e3d
3 changed files with 17 additions and 7 deletions

View File

@@ -4,6 +4,7 @@ import (
"encoding/json"
"errors"
"net/http"
"time"
"github.com/gorilla/mux"
"github.com/gravitl/netmaker/database"
"github.com/gravitl/netmaker/functions"
@@ -112,6 +113,7 @@ func ValidateRelay(relay models.RelayRequest) error {
}
func UpdateRelay(network string, oldAddrs []string, newAddrs []string) {
time.Sleep(time.Second/4)
err := SetNodesDoNotPropagate("no", network, oldAddrs)
if err != nil {
functions.PrintUserLog("netmaker",err.Error(),1)