control/controlclient, ipn/ipnlocal: remove Client.SetExpirySooner, fix race

Client.SetExpirySooner isn't part of the state machine. Remove it from
the Client interface.

And fix a use of LocalBackend.cc without acquiring the lock that
guards that field.

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2022-06-19 22:00:22 -07:00
committed by Brad Fitzpatrick
parent ef0d740270
commit 87a4c75fd4
3 changed files with 7 additions and 11 deletions

View File

@@ -11,7 +11,6 @@ package controlclient
import (
"context"
"time"
"tailscale.com/tailcfg"
)
@@ -43,9 +42,6 @@ type Client interface {
// Logout starts a synchronous logout process. It doesn't return
// until the logout operation has been completed.
Logout(context.Context) error
// SetExpirySooner sets the node's expiry time via the controlclient,
// as long as it's shorter than the current expiry time.
SetExpirySooner(context.Context, time.Time) error
// SetPaused pauses or unpauses the controlclient activity as much
// as possible, without losing its internal state, to minimize
// unnecessary network activity.