From f7b7ccf83572654811c008b9ca1081713ad28a7b Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Thu, 31 Aug 2023 22:28:47 -0700 Subject: [PATCH] control/controlclient, ipn/ipnlocal: unplumb a bool true literal opt Updates #cleanup Change-Id: I664f280a2e06b9875942458afcaf6be42a5e462a Signed-off-by: Brad Fitzpatrick --- control/controlclient/direct.go | 5 +---- ipn/ipnlocal/local.go | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/control/controlclient/direct.go b/control/controlclient/direct.go index 34d3eb147..d7c83e38f 100644 --- a/control/controlclient/direct.go +++ b/control/controlclient/direct.go @@ -69,7 +69,6 @@ type Direct struct { clock tstime.Clock lastPrintMap time.Time newDecompressor func() (Decompressor, error) - keepAlive bool logf logger.Logf netMon *netmon.Monitor // or nil discoPubKey key.DiscoPublic @@ -117,7 +116,6 @@ type Options struct { Hostinfo *tailcfg.Hostinfo // non-nil passes ownership, nil means to use default using os.Hostname, etc DiscoPublicKey key.DiscoPublic NewDecompressor func() (Decompressor, error) - KeepAlive bool Logf logger.Logf HTTPTestClient *http.Client // optional HTTP client to use (for tests only) NoiseTestClient *http.Client // optional HTTP client to use for noise RPCs (tests only) @@ -253,7 +251,6 @@ func NewDirect(opts Options) (*Direct, error) { clock: opts.Clock, logf: opts.Logf, newDecompressor: opts.NewDecompressor, - keepAlive: opts.KeepAlive, persist: opts.Persist.View(), authKey: opts.AuthKey, discoPubKey: opts.DiscoPublicKey, @@ -863,7 +860,7 @@ func (c *Direct) sendMapRequest(ctx context.Context, isStreaming bool, nu Netmap request := &tailcfg.MapRequest{ Version: tailcfg.CurrentCapabilityVersion, - KeepAlive: c.keepAlive, + KeepAlive: true, NodeKey: persist.PublicNodeKey(), DiscoKey: c.discoPubKey, Endpoints: epStrs, diff --git a/ipn/ipnlocal/local.go b/ipn/ipnlocal/local.go index 2d8b953d9..9ea569a29 100644 --- a/ipn/ipnlocal/local.go +++ b/ipn/ipnlocal/local.go @@ -1440,7 +1440,6 @@ func (b *LocalBackend) Start(opts ipn.Options) error { ServerURL: serverURL, AuthKey: opts.AuthKey, Hostinfo: hostinfo, - KeepAlive: true, NewDecompressor: b.newDecompressor, HTTPTestClient: httpTestClient, DiscoPublicKey: discoPublic,