control/controlclient: add Auto.updateRoutine
Instead of having updates replace the map polls, create a third goroutine which is solely responsible for making sure that control is aware of the latest client state. This also makes it so that the streaming map polls are only broken when there are auth changes, or the client is paused. Updates tailscale/corp#5761 Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
@@ -42,7 +42,10 @@ func TestNewDirect(t *testing.T) {
|
||||
t.Errorf("c.serverURL got %v want %v", c.serverURL, opts.ServerURL)
|
||||
}
|
||||
|
||||
if !hi.Equal(c.hostinfo) {
|
||||
// hi is stored without its NetInfo field.
|
||||
hiWithoutNi := *hi
|
||||
hiWithoutNi.NetInfo = nil
|
||||
if !hiWithoutNi.Equal(c.hostinfo) {
|
||||
t.Errorf("c.hostinfo got %v want %v", c.hostinfo, hi)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user