From e72f480d224ac4ebd9840dc3a42c792b34ededc9 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Tue, 27 Oct 2020 13:57:10 -0700 Subject: [PATCH] ipn: convert an int to a bool --- ipn/local.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ipn/local.go b/ipn/local.go index cb80adf8f..0616bf55f 100644 --- a/ipn/local.go +++ b/ipn/local.go @@ -90,7 +90,7 @@ type LocalBackend struct { endpoints []string blocked bool authURL string - interact int + interact bool prevIfState *interfaces.State // statusLock must be held before calling statusChanged.Wait() or @@ -315,7 +315,7 @@ func (b *LocalBackend) setClientStatus(st controlclient.Status) { } if st.URL != "" { b.logf("Received auth URL: %.20v...", st.URL) - if interact > 0 { + if interact { b.popBrowserAuthNow() } } @@ -671,7 +671,7 @@ func (b *LocalBackend) send(n Notify) { func (b *LocalBackend) popBrowserAuthNow() { b.mu.Lock() url := b.authURL - b.interact = 0 + b.interact = false b.authURL = "" b.mu.Unlock() @@ -855,7 +855,7 @@ func (b *LocalBackend) Login(token *oauth2.Token) { func (b *LocalBackend) StartLoginInteractive() { b.mu.Lock() b.assertClientLocked() - b.interact++ + b.interact = true url := b.authURL c := b.c b.mu.Unlock()