From febe30ea68fe847bd6aa36d7459b35eb93444bb9 Mon Sep 17 00:00:00 2001 From: Fran Bull Date: Wed, 26 Feb 2025 08:29:13 -0800 Subject: [PATCH] error auth refresh if server not running --- tsconsensus/authorization.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tsconsensus/authorization.go b/tsconsensus/authorization.go index 881408a88..ef0c89698 100644 --- a/tsconsensus/authorization.go +++ b/tsconsensus/authorization.go @@ -5,10 +5,12 @@ package tsconsensus import ( "context" + "errors" "net/netip" "slices" "sync" + "tailscale.com/ipn" "tailscale.com/ipn/ipnstate" "tailscale.com/tsnet" ) @@ -29,6 +31,9 @@ func (a *authorization) refresh(ctx context.Context) error { if err != nil { return err } + if tStatus.BackendState != ipn.Running.String() { + return errors.New("ts Server is not running") + } a.mu.Lock() defer a.mu.Unlock() a.peers = newPeers(tStatus)