ipn/ipnlocal: stop offline auto-updates on shutdown (#12342)

Clean up the updater goroutine on shutdown, in addition to doing that on
backend state change. This fixes a goroutine leak on shutdown in tests.

Updates #cleanup
pull/12343/head
Andrew Lytvynov 6 months ago committed by GitHub
parent ba0dd493c8
commit 379e2bf189
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -730,6 +730,7 @@ func (b *LocalBackend) Shutdown() {
if b.peerAPIServer != nil { if b.peerAPIServer != nil {
b.peerAPIServer.taildrop.Shutdown() b.peerAPIServer.taildrop.Shutdown()
} }
b.stopOfflineAutoUpdate()
b.unregisterNetMon() b.unregisterNetMon()
b.unregisterHealthWatch() b.unregisterHealthWatch()

Loading…
Cancel
Save