From cc080b72fda0b7de39e27ac98487ca75c6ea4ca3 Mon Sep 17 00:00:00 2001 From: David Crawshaw Date: Thu, 27 May 2021 10:18:42 -0700 Subject: [PATCH] cmd/tailscale: have web POST wait for authURL Fixes #1939 Signed-off-by: David Crawshaw (cherry picked from commit 82b217f82e83749967e382a48869a800c5e93600) --- cmd/tailscale/cli/web.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/tailscale/cli/web.go b/cmd/tailscale/cli/web.go index ecfb5c481..38fb737e5 100644 --- a/cmd/tailscale/cli/web.go +++ b/cmd/tailscale/cli/web.go @@ -321,6 +321,10 @@ func tailscaleUpForceReauth(ctx context.Context) (authURL string, retErr error) }) bc.StartLoginInteractive() + <-pumpCtx.Done() // wait for authURL or complete failure + if authURL == "" && retErr == nil { + retErr = pumpCtx.Err() + } if authURL == "" && retErr == nil { return "", fmt.Errorf("login failed with no backend error message") }