From 3a94ece30cb443c9ac92aa129ec4fb4f56d9ecea Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Sat, 12 Feb 2022 16:19:33 -0800 Subject: [PATCH] control/controlclient: remove dummy endpoint in endpoint stripping mode The TODO is done. Magicsock doesn't require any endpoints to create an *endpoint now. Verified both in code and empirically: I can use the env knob and access everything. Change-Id: I4fe7ed5b11c5c5e94b21ef3d77be149daeab998a Signed-off-by: Brad Fitzpatrick --- control/controlclient/direct.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/control/controlclient/direct.go b/control/controlclient/direct.go index fc407e55e..601db0dbd 100644 --- a/control/controlclient/direct.go +++ b/control/controlclient/direct.go @@ -825,10 +825,7 @@ func (c *Direct) sendMapRequest(ctx context.Context, maxPolls int, cb func(*netm if Debug.StripEndpoints { for _, p := range resp.Peers { - // We need at least one endpoint here for now else - // other code doesn't even create the discoEndpoint. - // TODO(bradfitz): fix that and then just nil this out. - p.Endpoints = []string{"127.9.9.9:456"} + p.Endpoints = nil } } if Debug.StripCaps {