ipn/ipnlocal: avoid ResetAndStop panic
Updates #18187 Change-Id: If7375efb7df0452a5e85b742fc4c4eecbbd62717 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
6ace3995f0
commit
0df4631308
@@ -5809,7 +5809,14 @@ func (b *LocalBackend) stateMachineLocked() {
|
|||||||
func (b *LocalBackend) stopEngineAndWaitLocked() {
|
func (b *LocalBackend) stopEngineAndWaitLocked() {
|
||||||
syncs.RequiresMutex(&b.mu)
|
syncs.RequiresMutex(&b.mu)
|
||||||
b.logf("stopEngineAndWait...")
|
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.setWgengineStatusLocked(st)
|
||||||
b.logf("stopEngineAndWait: done.")
|
b.logf("stopEngineAndWait: done.")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user