diff --git a/ipn/ipnlocal/local.go b/ipn/ipnlocal/local.go index 998c10196..a95b7b921 100644 --- a/ipn/ipnlocal/local.go +++ b/ipn/ipnlocal/local.go @@ -5768,7 +5768,14 @@ func (b *LocalBackend) stateMachineLocked() { // b.mu must be held. func (b *LocalBackend) stopEngineAndWaitLocked() { b.logf("stopEngineAndWait...") - st, _ := b.e.ResetAndStop() // TODO: what should we do if this returns an error? + st, err := b.e.ResetAndStop() + if err != nil { + // TODO(braditz): our caller, popBrowserAuthNowLocked, probably + // should handle this somehow. For now, just log it. + // See tailscale/tailscale#18187 + b.logf("stopEngineAndWait: ResetAndStop error: %v", err) + return + } b.setWgengineStatusLocked(st) b.logf("stopEngineAndWait: done.") }