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
This commit is contained in:
Andrew Lytvynov 2024-06-04 07:59:59 -07:00 committed by GitHub
parent ba0dd493c8
commit 379e2bf189
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

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