summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@tailscale.com>2022-04-20 19:15:43 -0700
committerBrad Fitzpatrick <brad@danga.com>2022-04-20 19:25:42 -0700
commit7a097ccc83d69068ef92b48e7e02cb71d32c2f0e (patch)
tree6242be37df23852af36b21b8b5933d9638621570
parent2b8b887d5518d08eee9a121bd70c33059c3b71c1 (diff)
downloadtailscale-7a097ccc83d69068ef92b48e7e02cb71d32c2f0e.tar.xz
tailscale-7a097ccc83d69068ef92b48e7e02cb71d32c2f0e.zip
ipn/ipnlocal: close peerapi listeners on LocalBackend.Shutdown
For tests. Now that we can always listen (whereas we used to fail prior to a2c330c4961aea883a674aa530cc40bf74047bac), some goroutine leak checks were failing in tests in another repo after that change. Change-Id: Id95a4b71167eca61962a48616d79741b9991e0bc Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
-rw-r--r--ipn/ipnlocal/local.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/ipn/ipnlocal/local.go b/ipn/ipnlocal/local.go
index cbaa89c3c..000f0d91c 100644
--- a/ipn/ipnlocal/local.go
+++ b/ipn/ipnlocal/local.go
@@ -344,6 +344,7 @@ func (b *LocalBackend) onHealthChange(sys health.Subsystem, err error) {
func (b *LocalBackend) Shutdown() {
b.mu.Lock()
cc := b.cc
+ b.closePeerAPIListenersLocked()
b.mu.Unlock()
b.unregisterLinkMon()