diff options
Diffstat (limited to 'control/controlclient')
| -rw-r--r-- | control/controlclient/auto.go | 5 | ||||
| -rw-r--r-- | control/controlclient/direct.go | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/control/controlclient/auto.go b/control/controlclient/auto.go index 336a8d491..235c5e03d 100644 --- a/control/controlclient/auto.go +++ b/control/controlclient/auto.go @@ -8,11 +8,11 @@ import ( "errors" "fmt" "net/http" - "sync" "sync/atomic" "time" "tailscale.com/net/sockstats" + "tailscale.com/syncs" "tailscale.com/tailcfg" "tailscale.com/tstime" "tailscale.com/types/key" @@ -122,7 +122,7 @@ type Auto struct { observerQueue execqueue.ExecQueue shutdownFn func() // to be called prior to shutdown or nil - mu sync.Mutex // mutex guards the following fields + mu syncs.Mutex // mutex guards the following fields started bool // whether [Auto.Start] has been called wantLoggedIn bool // whether the user wants to be logged in per last method call @@ -194,6 +194,7 @@ func newNoStart(opts Options) (_ *Auto, err error) { observer: opts.Observer, shutdownFn: opts.Shutdown, } + syncs.RegisterMutex(&c.mu, "controlclient.Auto.mu") c.authCtx, c.authCancel = context.WithCancel(context.Background()) c.authCtx = sockstats.WithSockStats(c.authCtx, sockstats.LabelControlClientAuto, opts.Logf) diff --git a/control/controlclient/direct.go b/control/controlclient/direct.go index d5cd6a13e..9680da0be 100644 --- a/control/controlclient/direct.go +++ b/control/controlclient/direct.go @@ -328,6 +328,7 @@ func NewDirect(opts Options) (*Direct, error) { dnsCache: dnsCache, dialPlan: opts.DialPlan, } + syncs.RegisterMutex(&c.mu, "controlclient.Direct.mu") c.discoPubKey = opts.DiscoPublicKey c.closedCtx, c.closeCtx = context.WithCancel(context.Background()) |
