ipn/ipnlocal: fix race condition that results in a panic sending on a closed channel

Fixes #13288

Signed-off-by: Nick Khyl <nickk@tailscale.com>
This commit is contained in:
Nick Khyl
2024-08-27 23:11:00 -05:00
committed by Nick Khyl
parent 35423fcf69
commit 959285e0c5
3 changed files with 21 additions and 6 deletions
+1 -1
View File
@@ -331,7 +331,7 @@ func (b *LocalBackend) setServeConfigLocked(config *ipn.ServeConfig, etag string
if !has(k) {
for _, sess := range b.notifyWatchers {
if sess.sessionID == k {
close(sess.ch)
sess.cancel()
}
}
}