proxy changes

This commit is contained in:
Abhishek Kondur
2022-12-02 17:35:41 +05:30
parent 5b7ead91e6
commit 4b1a85a3ee
13 changed files with 129 additions and 88 deletions

View File

@@ -23,7 +23,6 @@ import (
"github.com/gravitl/netmaker/models"
"github.com/gravitl/netmaker/mq"
"github.com/gravitl/netmaker/netclient/ncutils"
nmproxy "github.com/gravitl/netmaker/nm-proxy"
"github.com/gravitl/netmaker/servercfg"
"github.com/gravitl/netmaker/serverctl"
stunserver "github.com/gravitl/netmaker/stun-server"
@@ -181,10 +180,10 @@ func startControllers() {
waitnetwork.Add(1)
go func() {
defer waitnetwork.Done()
ctx, cancel := context.WithCancel(context.Background())
_, cancel := context.WithCancel(context.Background())
waitnetwork.Add(1)
go nmproxy.Start(ctx, logic.ProxyMgmChan, servercfg.GetAPIHost())
//go nmproxy.Start(ctx, logic.ProxyMgmChan, servercfg.GetAPIHost())
err := serverctl.SyncServerNetworkWithProxy()
if err != nil {
logger.Log(0, "failed to sync proxy with server interfaces: ", err.Error())