ipn/ipnlocal: avoid ResetAndStop panic

Updates #18187

Change-Id: If7375efb7df0452a5e85b742fc4c4eecbbd62717
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
(cherry picked from commit 0df4631308)
release-branch/1.92
Brad Fitzpatrick 3 days ago committed by Alex Chan
parent 95a957cdd7
commit f5d1075cd4

@ -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.")
}

Loading…
Cancel
Save