control/controlclient: don't use Node as value type

This commit is contained in:
Brad Fitzpatrick
2020-03-19 13:19:02 -07:00
parent 7caa288213
commit 073bb8de80
3 changed files with 3 additions and 12 deletions

View File

@@ -18,7 +18,6 @@ import (
"net/http"
"os"
"runtime"
"strconv"
"strings"
"sync"
"time"
@@ -564,14 +563,6 @@ func (c *Direct) PollNetMap(ctx context.Context, maxPolls int, cb func(*NetworkM
Hostinfo: resp.Node.Hostinfo,
PacketFilter: resp.PacketFilter,
}
// Temporary (2020-02-21) knob to force debug, during DERP testing:
if ok, _ := strconv.ParseBool(os.Getenv("DEBUG_FORCE_DERP")); ok {
c.logf("debug: adding DERP endpoints to all peers")
for i := range nm.Peers {
peer := &nm.Peers[i]
peer.Endpoints = append([]string{"127.3.3.40:1"}, peer.Endpoints...)
}
}
for _, profile := range resp.UserProfiles {
nm.UserProfiles[profile.ID] = profile
}