mirror of
https://github.com/tailscale/tailscale.git
synced 2025-02-18 02:48:40 +00:00
ipn: convert an int to a bool
This commit is contained in:
parent
a3f17b8108
commit
e72f480d22
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user